Fwd: [Kannel 0000010]: HTTP requests get urlencoded twice (or even more) if HTTP 302 (redirect) responses are received
Bruno David Rodrigues <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
----- Mensagem Reenviada de [email protected] ----- Data: Fri, 21 Mar 2003 00:23:54 +0000 De: [email protected] Assunto: [Kannel 0000010]: HTTP requests get urlencoded twice (or even more) if HTTP 302 (redirect) responses are received The following NEW bug has been ADDED. ======================================================================= http://bugs.kannel.org/view_bug_page.php?f_id=10 ======================================================================= Reporter: tolj Handler: ======================================================================= Project: Kannel Bug ID: 0000010 Category: HTTP client Reproducibility: always Severity: minor Priority: normal Status: new ======================================================================= Date Submitted: 03-21-03 00:23 GMT Last Modified: 03-21-03 00:23 GMT ======================================================================= Summary: HTTP requests get urlencoded twice (or even more) if HTTP 302 (redirect) responses are received Description: When a sms-service group calls a get-url URL, espacially when you use a GSM modem and pass the %p (ie. +49173xxxx) variable in the get-url string for the sender address it will be urlencoded to %2B4917xxxx. Hence the '+' gets correcly urlencoded to '%2B'. So far so good. If the HTTP server responses with a HTTP 302 (redirect) the HTTP library will follow to the specified location, but the get-url value is re-urlencoded, which causes to urlencode the %2B4917xxx to %252B4917xxx. This malforms the orginal URL. Kannel should *not* run urlencode twice (or even more) if the client sides follows the redirections. ======================================================================= Bruno: Has anyone read the RFC to explain if an HTTP client should follow to the new location *AND* reinject the same querystring ? If kannel goes to "http://somehost/foo?phone=%p"; and it returns a "Location: http://otherhost/bar?dingding";, what should kannel do ? add the same ?phone=%p to the new location doesn't look ok to me. I think it should go directly to the location *without* anything else in querystring. Same about a POST. If you post and get back a location, should it post again in new location ou just GET it ? I think it should be the later. If I'm right ;), and even if this is still a bug, it's one that should never happens. Comments ? -- <br/> 16:40:44 up 121 days, 17:54, 4 users, load average: 0.32, 0.14, 0.05 BOFH excuse #2: solar flares