View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0027543||Documentation||Manual Content||Public||2017-08-24 17:18||2019-01-29 16:40|
|Reporter||Stewart Bishop||Assigned To||Mark Alexander|
|Priority||Low||Severity||C - General||Reproducibility||100%|
|Target Version||2.2.2||Fixed in Version||2.2.2|
|Summary||0027543: Manual Content: http_request() misbehaves when sending a buffer if the seek position is 0|
|Description||http_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 Reproduce||I 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.
|Tags||No tags attached.|
gms2_http_query_binary_bug.zip (6,216,258 bytes)
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
Closing. Verified as fixed in:
IDE v22.214.171.1247 Runtime v126.96.36.1992