About 302 (temporary) redirecting responses:

After a GET request, the client (kannel) should redirect the SAME request
to the URL pointed to in the Location: header.
This means, the query string should not re-urlencoded.

After a POST request, the same request should be POSTed the the new URL.
Specs tell that this should require user interaction, "since this might
change the conditions under which the request was issued". But I figure,
this will be a little hard, as Kannel is a daemon.

The above also goes when the status code is 301 (Moved permanently). But
Kannel should save the new URI's and use them for future connections.

The 303 status (See Other) is an exception. The new URI given in the
response should be retrieved using a GET method.

-- Rene...

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Bruno David Rodrigues
Sent: maandag 24 maart 2003 17:41
To: [EMAIL PROTECTED]
Subject: Fwd: [Kannel 0000010]: HTTP requests get urlencoded twice (or
evenmore) if HTTP 302 (redirect) responses are received




----- 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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to