Commit Graph

110 Commits

Author SHA1 Message Date
Carsten Brandt
a0c5171706 Merge pull request #1523 from Ragazzo/1279-CHttpRequest-another-fix
Small fix for CHttpRequest to send valid content-length and output
2012-11-28 11:46:41 -08:00
Alexander Makarov
db3e810440 Fixes #1756, Fixes #1673: CHttpRequest::getPreferredLanguage now works according to RFC2616. Added CHttpRequest::getPreferredLanguages that returns all user accepted languages in order of preference. 2012-11-27 23:02:39 +04:00
Alexander Makarov
41ea281f9b Fixed code style, comments and optimized a bit 2012-11-24 18:06:03 +04:00
Alexander Makarov
eb3a0d7898 Merge branch 'master' of git://github.com/Rupert-RR/yii into Rupert-RR-master 2012-11-24 17:45:10 +04:00
Rupert-RR
ac64837f7a Replaced the closure used for the usort with a create_function call
Yii should work under PHP5.1, and closures were only added by PHP5.3, so a create_function call is used instead to preserve compatibility.
2012-11-19 14:56:43 +04:00
Rupert-RR
040af99c39 Update framework/web/CHttpRequest.php
Updated the name of the private property used to store the list of accepted languages (no further need for a store for the preferred language since we just take the first value from this list).
2012-11-19 11:33:24 +04:00
Rupert-RR
6a72da8397 Update framework/web/CHttpRequest.php
Modified sorting logic to use more expensive, but accurate taking into account of each language's position in the header.
For a language that is present more than once, the highest q value will be used (or the highest position if q values are equal).
getPreferredLanguages() will now always return an array (empty if no / incorrect header is set).
2012-11-19 11:28:18 +04:00
Alexander Makarov
9ab8316b57 Fixes #1392: HostInfo was appended to CHttpRequest::redirect() location in case of using protocol relative URLs 2012-11-15 02:15:35 +04:00
Rupert-RR
1da2a6c31e Store parsing of Accept-Language header for public access and correct preferred language order
By convention, when multiple languages are given with the same preference value in the Accept-Language header then the order of preference should correspond to the order in which they are given.
Currently CHttpRequest does not define any preference according to order when sorting languages after having parsed them.
This update creates a new variable to allow access to the sorted list of preferred languages (useful for content negotiation), and adds a very small decremental value to each language when parsing, so that earlier languages are given priority over later ones in the sort rather than relying on PHP's arsort to arbitrarily sort equal values.
Test with an Accept-Language header of "ru, en, en-GB, zh-Hans, ja, zh-Hant, fr, de, nl, it, es" (ru should be the preferred language rather than de).
2012-11-08 17:35:19 +04:00
Carsten Brandt
e8990c6147 Added information on XSendFile bug to CHttpRequest
Problem happens with XSendFile together with SSl.
http://blogs.digitss.com/programming/internet-explorer-was-not-able-to-open-this-internet-site-the-requested-site-is-either-unavailable-or-cannot-be-found/
2012-10-31 15:46:52 +01:00
Ragazzo
b80f229d9e Merge branch 'master' of git://github.com/yiisoft/yii into 1279-CHttpRequest-another-fix 2012-10-11 01:59:22 +04:00
Alexander Makarov
9844c80ddf Fixes #259: CHttpRequest::getRestParams is now public 2012-10-10 21:20:30 +04:00
Ragazzo
73df240c7a Correct fix with #1249 2012-10-03 14:46:50 +04:00
Ragazzo
9b71569a96 Correct tab indent fix 2012-10-03 14:05:44 +04:00
Ragazzo
a4513533e0 Some bug fixes 2012-10-03 14:01:08 +04:00
Ragazzo
8a34239cc2 Small fix for CHttpRequest to send valid content-length and output, from issue #1279 and #1249 2012-10-03 13:33:19 +04:00
Alexander Kochetov
486723805e else if => elseif 2012-10-03 10:20:14 +04:00
Alexander Makarov
60154d50de Refactored CHttpRequest a bit 2012-09-25 02:11:51 +04:00
Alexander Makarov
c8aa982dff Fixes #1443: Added CHttpRequest::getRawBody() that allows reading RAW HTTP request body multiple times 2012-09-25 01:53:41 +04:00
Alexander Makarov
d865a3bab8 Fixes #1057 Removed SVN ids 2012-09-09 22:23:45 +04:00
Alexander Makarov
568a2158b4 Fixes #861: changed CHttpRequest::redirect docs to match code 2012-09-09 21:39:58 +04:00
Alexander Makarov
50ac7d68f8 Fixes #1299 Added CSRF token validation for PUT and DELETE 2012-09-08 14:52:31 +04:00
Carsten Brandt
87e93f1edf Merge pull request #1250 from andyhu/patch-1
Update framework/web/CHttpRequest.php
2012-09-03 13:36:49 -07:00
Carsten Brandt
ccd32774d2 enhanced doc in CHttpRequest to allow autocomplete $cookie
fixes #862
2012-09-03 21:41:44 +02:00
Mikhail Osher
f270eb763e Spaces to Tabs 2012-08-31 13:59:51 +04:00
Mikhail Osher
6e5f42adc7 CHttpRequest check token on PUT/DELETE requests too. 2012-08-28 15:47:48 +04:00
andyhu
d9dde75fb8 Update framework/web/CHttpRequest.php
See issue https://github.com/yiisoft/yii/issues/1249
2012-08-18 21:45:29 +08:00
Suralc
40f813763a Revert CCookieCollection::add(). 2012-08-01 18:21:29 +02:00
speedlog
59f92b567a Correct misspell #950 2012-07-11 10:25:47 +02:00
Alexander Makarov
e9c5d981d9 Fixes #772: CHttpRequest::getIsSecureConnection() was failing on some conditions 2012-07-02 01:11:36 +04:00
Qiang Xue
c927e033c8 fixed typo 2012-06-30 22:17:13 -04:00
Maxim Chernyshev
18f6279a8a Made CCookieCollection::removeCookie() use empty string and expanded the docs for CCookieCollection::remove() 2012-06-26 19:47:11 +08:00
Maxim Chernyshev
abd5b56a69 Added cookie options parameter so that cookies can be removed using the parameters they were set with 2012-05-10 08:14:24 +08:00
mdomba (mdlap)
d3b0bc0d93 Merge branch 'fix120-set-cookie-name-only-once-bc' of https://github.com/suralc/yii into suralc-fix120-set-cookie-name-only-once-bc
Conflicts:
	CHANGELOG
2012-05-02 17:22:18 +02:00
resurtm
bb19be375e Proper handling Flash/Flex request when using FireBug WebLogRoute. 2012-02-17 10:17:15 +06:00
Qiang Xue
a1ccd4222f Merge pull request #338 from musterknabe/master
Fixed typo in CHttpRequest
2012-02-16 08:02:06 -08:00
Alexander Makarov
33523d6412 typo fix 2012-02-16 20:01:16 +04:00
Jonas Girnatis
ad8f929620 Typo 2012-02-16 16:55:00 +01:00
Jonas Girnatis
e0d01e5cf4 Added tunneled PUT and DELETE support for POST requests with parameter "_method"
If the parameter _method=PUT|DELETE is present in the POST body the request is treated like a real PUT or DELETE request and routed accordingly
2012-02-16 15:51:43 +01:00
mdomba
1195157d2c added 'since' note 2012-02-10 14:13:00 +00:00
mdomba
04aa9a56b7 (Fixes issue 3154) xSendFile - removed file existance check and added additional headers option 2012-02-09 11:10:17 +00:00
mdomba
3ac82f4323 updated outdated link 2012-02-02 11:08:13 +00:00
keyboard.idol@gmail.com
f2dd7bee6c (Fixes issue 3097) 2012-01-22 12:38:59 +00:00
mdomba
a7ef3d5d02 removed 1.0.x reference from documentation 2011-12-28 12:29:24 +00:00
mdomba
6dac47b789 (Fixes issue 2929) added forceDownload to xSendFile options 2011-11-04 18:24:38 +00:00
alexander.makarow
646cbb2b9a Documented component accessors with @property for significantly better IDE autocomplete 2011-10-25 00:01:09 +00:00
mdomba
8cec50f263 2011-10-17 13:09:08 +00:00
mdomba
21882a111b (Reverted r3412 - regarding issue 2859) 2011-10-17 10:21:58 +00:00
mdomba
5ea7f5f294 (Fixes issue 2859) getIsSecureConnection() now checks SERVER_PORT in case HTTPS is not set for SSL connections 2011-10-10 10:40:33 +00:00
alexander.makarow
54b8aef803 (Fixes issue 2822) Fixed warning when "Host:" isn't present or is empty in HTTP request headers 2011-09-26 22:29:27 +00:00