-->
Page 1 of 2

difference between a browser post vs curl post

PostPosted: Mon May 18, 2015 1:40 am
by joefly888
Hi I came across a weird result.

I have an if/else in my node server checking for the passing of parameters. If I do a curl to the http://192.168.1.100:8000 and http://192.168.1.100:8000/?name=xxx the program acts correctly. But if I enter both of the url in the broswer, it seems to hit both if and else statement. or is it hitting the server twice when I use the browser.

Just curious if this in normal of doing POST or GET from browser.

Thanks

Re: difference between a browser post vs curl post

PostPosted: Tue May 19, 2015 3:30 pm
by Leo.J
giving my first post to you :D

i'm new here, and i could be wrong, so dont blame me.

from what i know, the browser sends the "user agent", but i dont believe that affects the result, but maybe re-transmission caused this problem? do you always see the request hitting esp8266 twice?

Re: difference between a browser post vs curl post

PostPosted: Wed May 27, 2015 1:17 pm
by cal
Moin,

You may get more answers if you show some code.

Cal

Re: difference between a browser post vs curl post

PostPosted: Wed May 27, 2015 2:46 pm
by KurtB
Hi,
maybe the Browser send an additional request to get a File named favicon.ico.
You can trace it by use netcat instead of your ESP - on a different Server for shure.
KurtB