Headers are returned along with response, when curl requests with followLocation option sent

3 views
Skip to first unread message

Alexander Obuhovich

unread,
Jul 6, 2012, 10:32:25 AM7/6/12
to In-Portal Bugs
When trying to read page contents from given url via CURL library you might get 302 response header (redirect request to new page location) instead of 200 with proper page content.
To solve this CURL has FOLLOW_LOCATION option that can be enabled. However this option doesn't work, when "option_basedir" or "safe_mode" settings in php.ini file are used.

We solved this problem in http://tracker.in-portal.org/view.php?id=0001283 task (in 5.2.0-RC1), but a bug was made back then that resulted in headers returned along with queried url contents.


Task: http://tracker.in-portal.org/view.php?id=1338

Ready for testing.
curl_followlocation_header_fix.patch
Reply all
Reply to author
Forward
0 new messages