[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Antwort: Problem with POST in HTT API




Fortunately, 1.11pre4 creates a debug log (in the directory, where I supposedly have no rights, hehe) which might help to shed some light on the problem (I have blanked out the user, password, etc. with '*'). Interesting side note: what I previously had considered "uninitialised htt_error" seems to be actually set on purpose. The gibberish gets set by the API.

I do not know the innards of HTTP API well, but it look suspiciously like the first time the "HTTP/1.1 100 Continue" is correctly identified as "no error", but the next time it is handled differently. Finally, when the API gets the result of the POST, which should read like "ID: f7ad50581876af8cf4799dedf8b828f7", it does not get converted and leads to an "error"

-----------------------------------------------------------------
HTTPAPI Ver 1.11pre4 released 2005-06-22

http_persist_open(): entered
http_long_ParseURL(): entered
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /http/sendmsg HTTP/1.1
Host: api.clickatell.com
User-Agent: http-api/1.11
Content-Type: text/xml
Expect: 100-continue
Content-Length: 99


recvresp(): entered
SetError() #43: CommTCP_read: No 100-Continue (error ignored)
senddoc(): entered
api_id=*****&user=*****&password=*****&to=4369981250924&from=HTTP_API&text=Das+ist+ein+Test%7C

recvresp(): entered
HTTP/1.1 100 Continue


SetError() #13: HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Date: Thu, 23 Jun 2005 07:59:10 GMT
Server: Apache/1.3.28 (Unix) mod_ssl/2.8.15 OpenSSL/0.9.7d PHP/4.3.4
X-Powered-By: PHP/4.3.4
Transfer-Encoding: chunked
Content-Type: text/html


SetError() #13: HccWaqKq@xxx@C#        $
http_close(): entered
-----------------------------------------------------------------



This is how it looks like with GET. Please note that we get "200 OK" instead of "100 Continue"!

Honestly, I know nothing about the HTTP protocol, but I suppose that after a "100 Continue" we are supposed to tell the server that we are done and then the server will reply with "200 OK" and give us the requested document.

-----------------------------------------------------------------
HTTPAPI Ver 1.11pre4 released 2005-06-22

http_persist_open(): entered
http_long_ParseURL(): entered
http_persist_get(): entered
http_long_ParseURL(): entered
do_get(): entered
GET /http/sendmsg?api_id=******&user=*****&password=********&to=43699250924&from=HTTP_API&text=Das+ist+ein+Test HTTP/1.1
Host: api.clickatell.com
User-Agent: http-api/1.11


recvresp(): entered
HTTP/1.1 200 OK
Date: Thu, 23 Jun 2005 08:29:19 GMT
Server: Apache/1.3.28 (Unix) mod_ssl/2.8.15 OpenSSL/0.9.7d PHP/4.3.4
X-Powered-By: PHP/4.3.4
Transfer-Encoding: chunked
Content-Type: text/html


SetError() #13: HTTP/1.1 200 OK
recvdoc parms: chunked 0
recvchunk(): entered
get_chunk_size(): entered
24

chunk size = 36
get_chunk_size returned 36
calling comm_blockread
ID: fd47d3e04e4d3e384fce64c6e71a9a89
comm_blockread returned 36


get_chunk_size(): entered
0

chunk size = 0
get_chunk_size returned 0
http_close(): entered
-----------------------------------------------------------------


Christian Vitroler

owner-ftpapi@xxxxxxxxxxxxx schrieb am 23.06.2005 09:09:06:

>
> I have installed 1.11pre4 and the problem remains.
>
> Christian Vitroler
>
> owner-ftpapi@xxxxxxxxxxxxx schrieb am 22.06.2005 12:00:54:
>
> >
> > Hello all... I have an interesting problem:
> >
> > I try to send a SMS message via www.clickatell.com. After fixing a
> > BUG in HTTP_URL_ENCODER (which I told Scott about in a seperate
> > email) it works fine, AS LONG as I am using GET. If I use POST, then
> > I am getting a TIMEOUT (rc=0). Using exactly the same data from
> > HTTP_URL_ENCODER, just obtained via "HTTP_URL_Encoder_GetPtr"
> > instead of "HTTP_URL_Encoder_GetStr".
> >
> > The POST works very well if issued from a simple HTML form, thus it
> > is not a server issue.
> >
> > Kind regards,
> > Christian Vitroler