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
Problem:
I have one $rest object that I use for several calls. If the first get() is answered with Content-Type: application/json and the second get() is answered with just 204 No Content without any Content-Type header at all then it is still processed by the JSONDecoder class, which produces an syntax error.
Probably cause:
In Core.php the $this->response object is initialized only in the constructor and not in e.g. call().
So any headers that are not present in a HTTP response will keep their previous values.
Possible fix:
I tried to move the initialization to call() which solved this problem but created a new one. Now the JSONDecoder is not called at all as BaseDecoder compares against an empty "$this->content_type".
I gabe up there :)
The text was updated successfully, but these errors were encountered:
HI! sorry for my late response, have been busy, I have added some fixes and unit test over the project the new version should work properly now please try it.
Problem:
I have one $rest object that I use for several calls. If the first
get()
is answered withContent-Type: application/json
and the secondget()
is answered with just204 No Content
without anyContent-Type
header at all then it is still processed by the JSONDecoder class, which produces an syntax error.Probably cause:
In
Core.php
the$this->response
object is initialized only in the constructor and not in e.g.call()
.So any headers that are not present in a HTTP response will keep their previous values.
Possible fix:
I tried to move the initialization to call() which solved this problem but created a new one. Now the JSONDecoder is not called at all as BaseDecoder compares against an empty "$this->content_type".
I gabe up there :)
The text was updated successfully, but these errors were encountered: