You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm having a problem with http server in the master branch. That is:
As stated in following function's description: httpd_resp_send, httpd_resp_send_chunk, httpd_resp_set_type; If no status code and content-type were set, the default content type is 'text/html'.
But when I send response without setting the content type as below:
httpd_resp_send(req, buf, buf_len);
The content type I get is application/json
I found that there may be a mistake here in file httpd_parse.c, line 570:
ra->content_type = (char *)HTTPD_TYPE_JSON;
I don't know if anyone having the same problem like me.
Or could any one confirm about the issue.
Thank you,
The text was updated successfully, but these errors were encountered:
Yes , that seems like a mistake. Line 570 should read
ra->content_type = (char *)HTTPD_TYPE_TEXT;
Thanks for letting us know. Will fix this issue ASAP
Alvin1Zhang
changed the title
Got application/json as default response content type
[TW#26634] Got application/json as default response content type
Oct 8, 2018
Hi,
I'm having a problem with http server in the master branch. That is:
As stated in following function's description: httpd_resp_send, httpd_resp_send_chunk, httpd_resp_set_type; If no status code and content-type were set, the default content type is 'text/html'.
But when I send response without setting the content type as below:
httpd_resp_send(req, buf, buf_len);
The content type I get is application/json
I found that there may be a mistake here in file httpd_parse.c, line 570:
ra->content_type = (char *)HTTPD_TYPE_JSON;
I don't know if anyone having the same problem like me.
Or could any one confirm about the issue.
Thank you,
The text was updated successfully, but these errors were encountered: