Bug #68291 [Ana->Csd]: 404 on urls with '+'

From: Date: Sat, 05 Sep 2015 12:52:12 +0000
Subject: Bug #68291 [Ana->Csd]: 404 on urls with '+'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195783@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68291&edit=1

 ID:                 68291
 Updated by:         cmb@php.net
 Reported by:        euperia at gmail dot com
 Summary:            404 on urls with '+'
-Status:             Analyzed
+Status:             Closed
 Type:               Bug
 Package:            Built-in web server
 Operating System:   OSX
 PHP Version:        5.5.18
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fd94c92171eb4f25a792b38c7754bdd76933ec04
Log: Fix #68291: 404 on urls with '+'


Previous Comments:
------------------------------------------------------------------------
[2015-09-05 11:16:51] cmb@php.net

The culprit is the URL decoding of the path component of the
request. This is done as if the path was
application/x-www-form-urlencoded, and not in the way specified by
RFC 3986, so that + signs in the path are erroneously decoded as
space characters.

------------------------------------------------------------------------
[2014-10-23 14:19:51] euperia at gmail dot com

Description:
------------
Using bower to manage JS deps and using the following javascript file throws a 404.

bower_components/history.js/scripts/bundled/html4+html5/jquery.history.js

The file definately exists and renaming it without the '+' works.  As this is a managed
file renaming it isn't an option.




Test script:
---------------
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Sample page</title>
</head>
<body>

<script
src="bower_components/history.js/scripts/bundled/html4+html5/jquery.history.js"></script>
</body>
</html>

Expected result:
----------------
PHP 5.5.15 Development Server started at Thu Oct 23 15:13:52 2014
Listening on http://0.0.0.0:3000
Document root is xxxxxxxxxxxxxxxxxxxxx
Press Ctrl-C to quit.
[Thu Oct 23 15:13:55 2014] 127.0.0.1:55959 [200]: /
[Thu Oct 23 15:13:55 2014] 127.0.0.1:55960 [200]:
/bower_components/history.js/scripts/bundled/html4+html5/jquery.history.js

Actual result:
--------------
PHP 5.5.15 Development Server started at Thu Oct 23 15:13:52 2014
Listening on http://0.0.0.0:3000
Document root is xxxxxxxxxxxxxxxxxxxxx
Press Ctrl-C to quit.
[Thu Oct 23 15:13:55 2014] 127.0.0.1:55959 [200]: /
[Thu Oct 23 15:13:55 2014] 127.0.0.1:55960 [404]:
/bower_components/history.js/scripts/bundled/html4+html5/jquery.history.js - No such file or
directory


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68291&edit=1


Thread (4 messages)

« previous php.bugs (#195783) next »