Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post request return http status 100 #56

Open
almazoff-gh opened this issue Jul 9, 2021 · 27 comments
Open

Post request return http status 100 #56

almazoff-gh opened this issue Jul 9, 2021 · 27 comments

Comments

@almazoff-gh
Copy link

almazoff-gh commented Jul 9, 2021

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 almazoff-gh changed the title Post request return status 100 Post request return http status 100 Jul 9, 2021
@almazoff-gh
Copy link
Author

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

изображение

@Wend4r
Copy link
Contributor

Wend4r commented Jul 9, 2021

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

@Wend4r
Copy link
Contributor

Wend4r commented Jul 9, 2021

I get http status code 100

What SourcePawn code do you use to get this status?

@almazoff-gh
Copy link
Author

I get http status code 100

What SourcePawn code do you use to get this status?

изображение

@almazoff-gh
Copy link
Author

almazoff-gh commented Jul 9, 2021

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

@Wend4r
Copy link
Contributor

Wend4r commented Jul 9, 2021

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
Copy link
Author

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
Copy link
Contributor

Wend4r commented Jul 9, 2021

Strange, HTTP status 1xx should handle CURL inside RIP

@almazoff-gh
Copy link
Author

Strange, HTTP status 1xx should handle CURL inside RIP

can I try something else

@almazoff-gh
Copy link
Author

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

@almazoff-gh
Copy link
Author

Now result http status is 0

@Wend4r
Copy link
Contributor

Wend4r commented Jul 9, 2021

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
Copy link
Author

изображение

@almazoff-gh
Copy link
Author

Second, i make request on server "nginx"

@almazoff-gh
Copy link
Author

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

@almazoff-gh
Copy link
Author

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
Copy link
Author

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

@Wend4r
Copy link
Contributor

Wend4r commented Jul 9, 2021

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

@almazoff-gh
Copy link
Author

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

@almazoff-gh
Copy link
Author

log from nginx

@almazoff-gh
Copy link
Author

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

@almazoff-gh
Copy link
Author

almazoff-gh commented Jul 10, 2021

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
изображение

@ErikMinekus
Copy link
Owner

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.

@almazoff-gh
Copy link
Author

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
Copy link
Author

everything is fine with GET requests

@ErikMinekus
Copy link
Owner

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.

@CrazyHackGUT
Copy link
Contributor

Can be fixed with #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants