curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: A string issue that after received the http 204, the curl_formadd function seems couldn't work again

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Sat, 4 Feb 2017 03:11:03 -0500

On 2/2/2017 9:51 PM, 杨俊 wrote:
> System: linux.
> Version: libcurl/7.52.1 OpenSSL/1.0.2i nghttp2/1.18.1
> Note:
> 1. get a new token firstly.
> for example:
> https://localhost:3000/authresponse#access_token=Atza%7CIwEBIA.......TVCuQ&token_type=bearer&expires_in=3600&scope=alexa%3Aall
> the token is start from "Atza%7CIwE...TVCuQ".
> Then modify this string a little to "Atza|IwE...TVCuQ" and instead of
> the line 33 of the code.
> 2. And put the file of 16k.raw in the same folder of the executable file.
> 3. In this demo, comment the line 545 and un-comment the line 546, you
> can get the OK demo(always get the 200 response circularly);
> comment the line 546 and un-comment the line 545, you can get the NG
> demo(will get the 204 response firstly, then the issue happened, can't
> send the content to the server).

I don't know exactly what I'm supposed to be seeing here. It appears to
be looping nonstop. I've left it on in the background for a while and
it's at

is_rcv_ok 204 ...
delete the mp3Ring...
-----finished count 205
-----------end-----------

[...] and then immediately later it tries to POST and gets 400 response:

is_rcv_ok 400 ...
delete the mp3Ring...
-----finished count 206
-----------end-----------

Which I think is what you're saying is the problem. In PING_HANDLE I
have the state set to NET_STATE_SEND_STATE as requested.

libcurl/7.53.0-DEV OpenSSL/1.0.2k nghttp2/1.19.0
libcurl built from latest commit 1c877a0
Windows

It would be good if we could reproduce this less code. I will try to
extract from this just that behavior so we can reproduce this cleaner.
In the meantime if anyone wants to give it a try with Linux you will
need a token:

https://www.amazon.com/ap/oa?client_id=amzn1.application-oa2-client.ab453129884d4274ab73de27c818c8c2&scope=alexa%3Aall&scope_data=%7B%22alexa%3Aall%22%3A%7B%22productID%22%3A%22avs_test_device%22,%22productInstanceAttributes%22%3A%7B%22deviceSerialNumber%22%3A%2212345%22%7D%7D%7D&response_type=token&redirect_uri=https%3A%2F%2Flocalhost:3000/authresponse

user: yangjun9772_at_126.com
pass: yj19861122

Will return URL not found, copy out the token and place it in the file
as *atoken:

...access_token=<COPYTHISPART>&token_type...

Token expires in about an hour I believe.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-04