View Issue Details

IDProjectCategoryView StatusLast Update
0027543DocumentationManual ContentPublic2019-01-29 16:40
ReporterStewart BishopAssigned ToMark Alexander 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
Product Version2.2.0 
Target Version2.2.2Fixed in Version2.2.2 
Summary0027543: Manual Content: http_request() misbehaves when sending a buffer if the seek position is 0
Descriptionhttp_request() misbehaves when sending a buffer if the seek position is 0 (headers are sent, but the request always times out). It works properly with any other seek position.

Seeking to the start of buffers is commonly done before doing things with them, so this undocumented and unexpected behavior is likely to occur when people try to send buffers via http_requst().
Steps To ReproduceI have provided a full minimal project with a NodeJS server (including the standalone Node executable). After unzipping the sample, go to the "server" folder in a terminal and run the command "node6.11_x86.exe index.js". The terminal will echo server-side info about the requests.

Then run the sample gameClient project. It will submit two requests, one with a seek position at 0 and one at 1. You'll see that the second request works, and the first request gets to the server but then hangs.

The code is in the o_bufferUploader object. Changing both requests to seek position 1 allows both to go through, and changing both to 0 allows neither to go through.
TagsNo tags attached.

Activities

Stewart Bishop

2017-08-24 17:18

Adminstrator  

gms2_http_query_binary_bug.zip (6,216,258 bytes)

Alan Savage

2017-12-12 14:18

Developer   ~0057012

i think this bug may just be down to an apparently undocumented feature of http_request when using a buffer for the body argument -
-if the buffer seek position is at the start(0) then no body is sent and the buffer is filled with the response from the http call
-if the buffer seek position is non-zero, then the buffer string contents is sent as the body

possibly this is documented somewhere since obviously some people are aware of it(eg http://bugs.yoyogames.com/view.php?id=28492) - but not on the http_request page

Mark Alexander

2018-01-19 12:15

Developer   ~0057408

Fixed

Matthew McInnes

2019-01-29 16:40

Adminstrator   ~0062559

Closing. Verified as fixed in:

IDE v2.2.2.387 Runtime v2.2.2.302