gm_bromsock icon indicating copy to clipboard operation
gm_bromsock copied to clipboard

Server only accepting every other request

Open reesercollins opened this issue 3 years ago • 6 comments

I've setup the HTTP host example code, and it handles http requests fine, but only every other request. I've tried using my browser as well as curl, but I still get the same result.

It doesn't even accept the packet being sent to it. It just disappears into the void.

reesercollins avatar Apr 04 '21 22:04 reesercollins

I haven't had this issue. What OS are you using, and is there a possibility you can attach a debugger to see where it ends up?

Bromvlieg avatar Apr 05 '21 12:04 Bromvlieg

Windows 10 Build 19041 I'm on whatever the current GMOD server version is.

I tried attaching gdb to see if there were any obvious issues like threads exiting with non-zero codes, but nothing like that occurred.

What's really strange is that my browser as well as curl aren't timing out, even after multiple minutes. They just hang. The server on the other hand acts like nothing happened. It doesn't freeze or anything like that.

reesercollins avatar Apr 06 '21 17:04 reesercollins

Alright, I've done some thinking and have come to two possible conclusions:

  1. It has something to do with Content-Security-Policy fuckery. Any chance you ever tested trying to fetch from localhost?
  2. It has something to do with Windows fuckery. What OS do you mainly test on?

reesercollins avatar Apr 08 '21 19:04 reesercollins

I usually use Windows, but i did ran checks on linux years ago when it released. I just realized tho, since then we got HTTP 2.0 going reusing the socket for more requests. perhaps that's messing up?

Bromvlieg avatar Apr 08 '21 19:04 Bromvlieg

I doubt it. My requests are via HTTP 1.1, and the server confirms that. It's strange however, as it's exactly every other request. Like one will go through, then the next wont even appear on the server.

I will note that close()ing and recreating the server doesn't make the next request be accepted. It always goes from being accepted to disappearing.

reesercollins avatar Apr 08 '21 22:04 reesercollins

Hi, sorry to bring up an old issue. Did you ever discover the cause @reesercollins? Experiencing the exact same issue currently on Windows 10 also.

morgverd avatar Feb 09 '23 17:02 morgverd