sm-ripext icon indicating copy to clipboard operation
sm-ripext copied to clipboard

Post request return http status 100

Open almazoff-gh opened this issue 3 years ago • 27 comments

When sending a post request to localhost: 3000, on which my web server is running on node.js, I get http status code 100, while throwing a request to my domain (to the server), there is already an nginx web server, I also get 100, but when I send a request to https, everything is normal.

almazoff-gh avatar Jul 09 '21 20:07 almazoff-gh

... - - [09/Jul/2021:21:46:28 +0000] "POST /test/aaa.php HTTP/1.1" 400 25 "-" "sm-ripext/1.3.0"

изображение

almazoff-gh avatar Jul 09 '21 21:07 almazoff-gh

HTTP status 100 in the POST means that the client must send the body.

Wend4r avatar Jul 09 '21 21:07 Wend4r

I get http status code 100

What SourcePawn code do you use to get this status?

Wend4r avatar Jul 09 '21 21:07 Wend4r

I get http status code 100

What SourcePawn code do you use to get this status?

изображение

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

HTTP status 100 in the POST means that the client must send the body.

Just if i send it to other apis, even if you take an example, everything works

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

I get http status code 100

What SourcePawn code do you use to get this status?

изображение

What is in the OnPostResponse() function, how do you understand what the HTTP status 100 is?

Wend4r avatar Jul 09 '21 22:07 Wend4r

I get http status code 100

What SourcePawn code do you use to get this status?

изображение

What is in the OnPostResponse() function, how do you understand what the HTTP status 100 is?

изображение

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Strange, HTTP status 1xx should handle CURL inside RIP

Wend4r avatar Jul 09 '21 22:07 Wend4r

Strange, HTTP status 1xx should handle CURL inside RIP

can I try something else

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

изображение изображение изображение

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Now result http status is 0

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Try

public void OnPostResponse(HTTPResponse response, any value, const char[] error)
{
	PrintToServer("Data %i", response.Status);
	PrintToServer("Error \"%s\"", error);
	PrintToServer("way-way");
}

Wend4r avatar Jul 09 '21 22:07 Wend4r

изображение

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Second, i make request on server "nginx"

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

in fact, to test my theory, you can simply raise the test server to 443

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Try

public void OnPostResponse(HTTPResponse response, any value, const char[] error)
{
	PrintToServer("Data %i", response.Status);
	PrintToServer("Error \"%s\"", error);
	PrintToServer("way-way");
}

изображение

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

He doesn't take info, because he send trouble request

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Try

public void OnPostResponse(HTTPResponse response, any value, const char[] error)
{
	PrintToServer("Data %i", response.Status);
	PrintToServer("Error \"%s\"", error);
	PrintToServer("way-way");
}

изображение

As I understand, after sending the POST Body to the WEB server, it did not respond further

Wend4r avatar Jul 09 '21 22:07 Wend4r

hostname - [09/Jul/2021:22:30:40 +0000] "POST /test/aaa.php HTTP/1.1" 400 25 "-" "sm-ripext/1.3.0"

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

log from nginx

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Again, the joke is that if you throw on https, then everything is fine

almazoff-gh avatar Jul 09 '21 22:07 almazoff-gh

Try

public void OnPostResponse(HTTPResponse response, any value, const char[] error)
{
	PrintToServer("Data %i", response.Status);
	PrintToServer("Error \"%s\"", error);
	PrintToServer("way-way");
}

изображение

As I understand, after sending the POST Body to the WEB server, it did not respond further

as soon as I threw https, everything began to work normally изображение

almazoff-gh avatar Jul 10 '21 16:07 almazoff-gh

when I send a request to https, everything is normal.

RiP will use HTTP/2 over HTTPS, if your server supports it. HTTP/2 does not use status code 100.

As Wend4r said, status code 100 tells the client to send the request body, so I don't know why libcurl is not sending it.

ErikMinekus avatar Jul 11 '21 10:07 ErikMinekus

when I send a request to https, everything is normal.

RiP will use HTTP/2 over HTTPS, if your server supports it. HTTP/2 does not use status code 100.

As Wend4r said, status code 100 tells the client to send the request body, so I don't know why libcurl is not sending it.

So what should I do in the end?

almazoff-gh avatar Jul 11 '21 10:07 almazoff-gh

everything is fine with GET requests

almazoff-gh avatar Jul 11 '21 11:07 almazoff-gh

So what should I do in the end?

Use HTTPS, if that works for you. Like I said, I don't know why it's not working, and I don't have time right now to look into it.

ErikMinekus avatar Jul 11 '21 11:07 ErikMinekus

Can be fixed with #68

CrazyHackGUT avatar Feb 14 '22 19:02 CrazyHackGUT