Commit Graph

271 Commits

Author SHA1 Message Date
Pierrick Charron
e68e2893c0 # Revert bug fix (will commit it again on 5.3 branch when 5.3.6 will be released) 2011-03-13 17:14:18 +00:00
Pierrick Charron
ee832705d1 Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment) 2011-03-13 04:02:56 +00:00
Pierrick Charron
6e74d95f34 Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment) 2011-03-13 04:02:56 +00:00
Gustavo André dos Santos Lopes
a888ee434b - Changed port validation introduced in commit #308035 to consider
negative ports and ports > 65535 as invalid.
  The tests that fail due to #308035 in the standard ext were not
  fixed. If the behavior in those tests turns out to be the
  desirable one, both this commit and #308035 ought to be reverted
  or at least adapted.
2011-02-05 22:37:00 +00:00
Gustavo André dos Santos Lopes
426f31e790 - Changed port validation introduced in commit #308035 to consider
negative ports and ports > 65535 as invalid.
  The tests that fail due to #308035 in the standard ext were not
  fixed. If the behavior in those tests turns out to be the
  desirable one, both this commit and #308035 ought to be reverted
  or at least adapted.
2011-02-05 22:37:00 +00:00
Ilia Alshanetsky
218448bfa0 Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number). 2011-02-04 21:41:15 +00:00
Ilia Alshanetsky
109b8e99e0 Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number). 2011-02-04 21:41:15 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Felipe Pena
50863932a6 - Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
patch by: Justin Martin (frozenfire@php)
2010-11-07 12:59:22 +00:00
Felipe Pena
83ebbc36a1 - Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
patch by: Justin Martin (frozenfire@php)
2010-11-07 12:59:22 +00:00
Pierre Joye
ed58636f00 - use TSRMLS_D/C with php_stream_context_alloc 2010-09-16 09:33:42 +00:00
Pierre Joye
cba1ed2475 - #50563, removing E_WARNING from parse_url() 2010-06-16 18:56:24 +00:00
Pierre Joye
cfd930d218 - #50563, removing E_WARNING from parse_url() 2010-06-16 18:56:24 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Ilia Alshanetsky
41611fd003 Fixed bug #50073 (parse_url() incorrect when ? in fragment). 2009-11-04 13:44:10 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Lars Strojny
50fa64885e Reverting local change 2008-08-20 21:26:04 +00:00
Lars Strojny
080157870f MFH: Allow mixed $initial (patch by Christian Seiler) 2008-08-20 20:35:40 +00:00
Rob Richards
5e60f46159 MFH: rawurlencode now conforms to rfc 3986 (~ is not encoded) [DOC] 2008-06-04 19:35:15 +00:00
Antony Dovgal
9d9468e9f4 fix compile warnings 2008-03-28 10:22:12 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen
6723ed1db3 MFH: Nuked ending dots from error messages 2007-09-30 05:49:45 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
e919a873cd Fixed bug #38859 (parse_url() fails if passing '@' in passwd). 2006-09-28 14:52:31 +00:00
Antony Dovgal
30a015a92f MFH: fix #38981 (using FTP URLs in get_headers() causes crash) 2006-09-28 12:55:15 +00:00
Ilia Alshanetsky
cc0d254e4f Fixed bug #38891 (get_headers() do not work with curl-wrappers). 2006-09-25 16:00:43 +00:00
Antony Dovgal
39856ab9cb MFH: fix possible segfault in #38891 2006-09-23 11:58:58 +00:00
Hannes Magnusson
bcd06ef1b6 Bug #37961 (url should be URL) 2006-06-29 14:31:56 +00:00
Hannes Magnusson
ec420c3df8 Updated protos & vim folding 2006-06-26 18:48:56 +00:00
Ilia Alshanetsky
535a2e6092 Fixed bug #36351 (parse_url() does not parse numeric paths properly). 2006-02-12 16:39:44 +00:00
Ilia Alshanetsky
fb7608a006 Make get_headers() use the default context. 2006-01-18 14:05:14 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Ilia Alshanetsky
2994c23670 MFH:
Added 2nd optional parameter to parse_url() that allows retrieval of
individual URL components.
Added 3rd optional parameter to http_build_query() that allows custom param
separator.
2005-12-04 17:44:27 +00:00
Ilia Alshanetsky
5610ad29e3 MFH: Fixed bug #34148 (+,- and . not supported as parts of scheme). 2005-08-16 14:20:41 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Ilia Alshanetsky
fddaa54410 Added scheme validation for parse_url(). 2005-05-26 03:56:21 +00:00
Ilia Alshanetsky
8281f41f3e Fixed bug #32813 (parse_url() does not handle scheme-only urls properly). 2005-04-25 23:47:37 +00:00
Ilia Alshanetsky
42155f6028 Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar) 2005-01-27 16:37:34 +00:00
Ilia Alshanetsky
4af4cf0914 Fixed bug #29913 (parse_url() is now binary safe). 2004-09-20 05:13:35 +00:00
Sara Golemon
851b6d4475 String lengths should never be char pointers. 2004-06-18 00:44:37 +00:00
Stefan Esser
2e3b9ec278 Fixed off-by-one in php_parse_url. 2004-05-28 11:33:23 +00:00
Sara Golemon
1335bc8fb8 Don't strip off those []s, it'll only create problems in wrappers and elsewhere. 2004-04-27 19:28:11 +00:00
Sara Golemon
99b6724a4c BugFix 28187 parse_url does not handle scheme://[0123:4567::89]:12345/etc style IPv6 embedded address URLs 2004-04-27 19:13:13 +00:00
Ard Biesheuvel
86fe4ab6a1 CS 2004-01-25 15:08:31 +00:00
Ard Biesheuvel
6b8c406481 Changed prototypes to allow parsing of string literals and constant strings
Minor CS/WS
2004-01-25 00:30:50 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Sara Golemon
e90f85e45d Scan for : in host:port pair from right instead of left.
This will allow handling of http://[fe80::1]:443/foo.html
IPv6 Numeric addressing with port number to parse correctly.
2003-12-15 06:54:31 +00:00
Ilia Alshanetsky
9947a3e7ce Fixed typo (thanks Frank) 2003-12-04 00:14:39 +00:00
Ilia Alshanetsky
81e41e3cb9 Remove unnecessary casts. 2003-12-03 22:51:51 +00:00
Moriyoshi Koizumi
247f991443 Possible fix for bug #26391 (parse_url() destroys strings that contain
a character in range of \x80-\xff))
2003-12-03 20:58:12 +00:00
Shane Caraveo
4505a611ba make parse_url work correctly for file uri's on windows, such as
file:///c:/somepath/somefile.txt
2003-10-19 20:00:51 +00:00
Ilia Alshanetsky
a9b20a6abf Fixed bug #25800 (parse_url() could not parse urls with empty port). 2003-10-13 04:27:23 +00:00
Ilia Alshanetsky
ed40ae2650 emalloc -> safe_emalloc 2003-08-11 23:16:54 +00:00
Ilia Alshanetsky
7825a1864c Fixed bug #24560 (parse_url() incorrectly handling certain file:// based
schemas).
2003-07-21 13:36:23 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sascha Schumann
e422f56dff improve php_url_encode 2003-04-28 16:24:14 +00:00
Ilia Alshanetsky
bce8bfdae4 MFH (forgot to put this fix into the 5.X tree). 2003-02-25 23:39:57 +00:00
Ilia Alshanetsky
b1a6778fe5 Added get_browser() function. This function can be used to fetch the headers
sent by the server when a request is made for a given URL.
2003-02-07 21:33:35 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Ilia Alshanetsky
bd19dabefe Fixed bug #21226 (parse_url handling of urls without a path). 2002-12-30 16:42:49 +00:00
Marcus Boerger
49a99a98f4 -php_error -> php_error_docref
-removed some cases where emalloc result was tested
2002-12-05 20:59:49 +00:00
Ilia Alshanetsky
6b7d77a7a0 Fixed bug #20420 and added partial urls to the test of the function. 2002-11-14 13:40:14 +00:00
Ilia Alshanetsky
8645f5c200 parse_url can now correctly parse mailto:, zlib: (old zlib wrapper) and
simular. Thanks to Wez Furlong for noticing the problem.
2002-11-07 15:41:32 +00:00
Ilia Alshanetsky
c3270448ac Added handling for file:/ schema, which does not contain a host. 2002-10-18 23:54:58 +00:00
Ilia Alshanetsky
cdf39db369 Added support for file:/. Thanks to Thies for noticing the problem. 2002-10-17 13:59:55 +00:00
Ilia Alshanetsky
bcf1d4ff80 Fixed a bug introduced by previous patch. 2002-10-12 16:09:01 +00:00
Stefan Esser
89f4f7b8f5 I already said that this construct was wrong...
most probably fixes bug #19876
2002-10-12 08:16:20 +00:00
Ilia Alshanetsky
1bbb55ec11 Added a much faster parse_url() implementation. This also fixes a number
of bugs in the old parse_url() implementation.
2002-10-06 16:14:42 +00:00
Stefan Esser
184323cbe5 php_url_parse() replaces controlchars with '_' now. This stops fopen wrapper
CR/LF injection issues.
2002-09-10 08:06:25 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Derick Rethans
6852a1e704 - Fix for bug #13413 2001-10-20 10:58:33 +00:00
Andrei Zmievski
8a54c2929f Convert to use new parameter parsing API. 2001-10-19 17:16:12 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Sterling Hughes
0935217091 fix proto 2001-09-04 06:21:48 +00:00
John Donagher
faa5031f25 Don't try and search a 0-length string. This allows parse_url() to correctly
parse a non-pathed URI, i.e. 'scheme://'
2001-08-24 02:21:16 +00:00
Sterling Hughes
844788a4b8 pval -> zval
Z_*_P{0,2} macros
easier way of doing urldecode(), from rawurldecode() (a tad faster too).
2001-08-17 07:41:20 +00:00
Zeev Suraski
c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Thies C. Arntzen
0ef0f8e32b ZVAL_BOOL(v,0) -> ZVAL_FALSE(v) 2001-07-11 12:42:25 +00:00
Zeev Suraski
66d94bc655 Nuke zval_reset 2001-07-11 11:39:10 +00:00
Zeev Suraski
d70ce7be27 var_reset -> ZVAL_RESET 2001-07-11 09:39:09 +00:00
Sebastian Bergmann
615cf785c1 Fix crash bug in urlencode(). 2001-06-19 15:20:50 +00:00
Zeev Suraski
1093ed17fb Clean-up
Remove a lot of 100% redundent code
2001-06-13 17:04:36 +00:00
Daniel Beulshausen
c6b4e55838 PHPAPIize url function to make them available to the outside (i.e. mbstring) 2001-06-11 15:14:04 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
foobar
613aacf0b0 MFB 2001-05-15 02:05:33 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Andi Gutmans
bf7603cf83 - Now really fix it. 2000-10-02 18:13:53 +00:00
Andi Gutmans
28c96e89e1 - Fix bug in parse_url() 2000-10-02 17:51:30 +00:00
Stig Venaas
9a9e2e72b0 Small fix to the literal IPv6 parsing, now stops at first ] after [ 2000-09-22 00:33:55 +00:00
Stig Venaas
0776f7d3d7 Parsing of URLs with literal IPv6 addresses, see RFC 2732
@- IPv6 support in fopen (one can access IPv6 ftp/web servers) (Stig Venaas)
2000-09-22 00:12:00 +00:00
Martin Kraemer
8bf2339870 Bug #6016: Fix EBCDIC logic error in urlencode()
(a strchr() test was used backwards)
Reported by: dumbunny@tivo.com
2000-08-08 09:06:51 +00:00
Rasmus Lerdorf
677df784c1 This url symbol was a bit too generic. Change it to php_url instead.
It was clashing with a similar typedef in the UdmSearch integration I am
working on.
2000-07-29 22:32:21 +00:00
Zeev Suraski
cbd3f41ba8 Fix #4928
Be *CAREFUL* with the _ex API, guys!
2000-06-09 13:15:19 +00:00
Andi Gutmans
3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00
Zeev Suraski
e043439ff6 Update the license with the new clause 6 2000-05-18 15:34:45 +00:00
Zeev Suraski
86fa2aade2 the pipe is breaking all the time 2000-02-19 23:41:32 +00:00
Thies C. Arntzen
9819391442 (url_parse) only free regex if compile worked. 2000-02-16 11:47:20 +00:00
Thies C. Arntzen
1fae341a98 (url_parse) fix memory leak (#3495) 2000-02-16 11:41:49 +00:00
Zeev Suraski
6d0ab6166c SAPIfication, Episode VI: Return of the SAPI
Remove mostly all references to APACHE and CGI_BINARY from the code.

- Apache include files are no longer included by any PHP code, except for the Apache SAPI module.
- No server specific code is in any of the base PHP code.

Still left to be done:
- Eliminate any references to APACHE from the few remaining modules.
- Move request_info.c's logic to SAPI
- Modify the regex function names, and globals, so that we can always
  include them, without having to fear any interference with Apache;
  Always use the bundled regex library
2000-02-10 19:41:21 +00:00
Zeev Suraski
2460569ccb Change string->str where possible; string is basic a C++ class, so gdb can't look
inside variables named 'string'.
2000-02-08 22:21:43 +00:00
Sascha Schumann
43ae2bffbb Happy Y2K patch! Happy new year (or the new millennium, depending on whether
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Zeev Suraski
a1ad2872ee - The tree compiles again 1999-12-18 22:40:35 +00:00
Zeev Suraski
3ee4e65c95 More php3_ annihilation 1999-12-18 04:01:20 +00:00
Zeev Suraski
a3c6514332 More php3_ annihilation 1999-12-17 19:51:39 +00:00
Sascha Schumann
11030ee410 (PHP urldecode) Fix for #2788, function changed parameter in place 1999-11-21 20:08:43 +00:00
Rasmus Lerdorf
cf0868fec8 Clean up regex header file mess. php.h now explicitly includes php_regex.h
and php_regex.h figures out which regex header files to include and
defines symbols that prevents other stuff from including the wrong versions
of regex header files.
1999-10-30 14:22:10 +00:00
Thies C. Arntzen
578c6035c8 (parse_url) fix for #2569: parse_url('-') crashes
@- Fixed parse_url('-') crash. (Thies)
1999-10-19 11:02:05 +00:00
Andrey Hristov
2fa5e6dd6a Fix for my fix. 1999-09-29 14:25:40 +00:00
Andrey Hristov
7665e9ef27 Fix for bug #2199. Redirect was returning http:// which resulted in a crash. 1999-09-27 15:17:28 +00:00
Sascha Schumann
7a1fff1441 Use new Zend API. 1999-09-24 19:35:25 +00:00
Zeev Suraski
3cb1eb0471 Removed '3' from key functions in PHP (maintained compatibility through
php3_compat.h)
1999-08-02 19:17:14 +00:00
Zeev Suraski
c5724cbd14 License update 1999-07-16 13:13:16 +00:00
Thies C. Arntzen
5fa6882567 urlencode and decode return an empty-string if the input-string is empty (matches php3 behaviour "more" closly)
Please read my previous mail and comment!
1999-06-22 13:35:28 +00:00
Sascha Schumann
39691bed9e conv_proto *.[ch] 1999-05-16 11:19:26 +00:00
Zeev Suraski
0b77132507 * Get Apache to work. POST doesn't work yet.
* There are now -I directives for the absolute path of php4, php4/libzend and the builddir for
  the Apache module, so we can #include any php/Zend header.
* Rename config.h to php_config.h
1999-05-11 00:01:47 +00:00
Zeev Suraski
0818d96c97 A lot of cleanups... Removed old thread-safe code and other redundant code and files 1999-04-24 00:12:00 +00:00
Zeev Suraski
6f7c0edee3 Remove tls.[ch] 1999-04-23 20:06:01 +00:00
Stig Bakken
257de2bade First commit of re-structuring phase one. We have started using automake in
sub-directories and started to move extension code into ext/<name>.  For now,
I have moved the "standard" extension (which is quite a mix of everything
right now) and the GD extension into their own subdirs in ext/.
The configure script now also runs configure in the libzend directory
automatically and makes sure php4 and libzend use the same config.cache file.
To avoid running configure in libzend, use the --no-recursion option.
"make" in php4 also builds libzend now.
The Apache module doesn't compile right now, but a fix for that is
coming up.
1999-04-17 00:37:12 +00:00