http_request can't run from MS script properly
LadyCailinBot opened this issue ยท 6 comments
CMDHELPER-2802 - Reported by Mateusz.Stefaniak
Hi,
When I have alais wchich is using http_request in contig.txt it runs properly, but if I move it to separete procedure in other name.ms file and run alais by including and running this procedure I got empty-body response from server. It's a bug, because it is not empty. It seems like the http_request callback success function is runing before the response is given from server.
Comment by LadyCailin
Please do not mark bugs as major, we will triage them appropriately.
Comment by Lildirt
The only issue I could think of is you aren't returning properly at the end of the proc. The proc isn't automatically set to whatever it should be returning, mind you. That's something you're meant to do yourself.
Otherwise, I'm clueless.
Comment by kookster
i have a working http_request in a alias, bind and proc. So I am unable to reproduce this.
Comment by Mateusz.Stefaniak
contig.txt -> http://paste.thezomg.com/11155/37901968/
includes/functions.ms -> http://paste.thezomg.com/11183/93539571/
Alias "test1" gives response, but test2 "gives" empty body of page with correct headers etc.
Comment by CyaNox
Using mostly the provided code I am capable of receiving content using both /test1 and /test2.
I changed the URL to http://google.com/ for both cases and received googles complaining about improper use of POST perfectly fine.