Bug #2438

204 No Content is treated as error when httpReq returns

Added by Leonid Protasov over 6 years ago. Updated over 6 years ago.

Status:InvalidStart date:12/30/2014
Priority:NormalDue date:
Assignee:Andreas Smas% Done:


Target version:4.8
Found in version:4.7.588 Platform:Linux


try {
    data = showtime.JSONDecode(showtime.httpReq(API + url, params));
    // after we got 204 we should continue here
} catch (err) {
    // but we land here

204 is not an error:

10.2.5 204 No Content

The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant.

If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view.

The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields.


#1 Updated by Leonid Protasov over 6 years ago

  • Description updated (diff)

This is how it ends:

HTTP            [DEBUG]: > DELETE /youtube/v3/subscriptions?id=bzZa8bZxwD6Rt0JnIlNJ67WzhWDAVm9dwVIx4uzO81o&key=AIzaSyCSDI9_w8ROa1UoE2CNIUdDQnUhNbp9XR4 HTTP/1.1
HTTP            [DEBUG]: > Authorization: Bearer ya29.7ADy2dEAzgGXHNU8sYejys13rQ7H4xLVOOZ0gBU-ix7pjY1fTtw61zICKYcxUJ4wkz1D0TsHJjqOXg
HTTP            [DEBUG]: > User-Agent: Showtime Linux/x86_64 4.7.588.gf21e9
HTTP            [DEBUG]: > Connection: keep-alive
HTTP            [DEBUG]: > Accept: */*
HTTP            [DEBUG]: > Accept-Encoding: identity
HTTP            [DEBUG]: > Host: www.googleapis.com
HTTP            [DEBUG]: https://www.googleapis.com/youtube/v3/subscriptions: Response:
HTTP            [DEBUG]: < HTTP/1.1 204 No Content
HTTP            [DEBUG]: < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
HTTP            [DEBUG]: < Pragma: no-cache
HTTP            [DEBUG]: < Expires: Fri, 01 Jan 1990 00:00:00 GMT
HTTP            [DEBUG]: < Date: Tue, 30 Dec 2014 17:10:55 GMT
HTTP            [DEBUG]: < ETag: "F9iA7pnxqNgrkOutjQAa9F2k8HY/7G2y8xeWVq9-yxUrvlxhacuUx5E" 
HTTP            [DEBUG]: < Vary: Origin
HTTP            [DEBUG]: < Vary: X-Origin
HTTP            [DEBUG]: < Server: GSE
HTTP            [DEBUG]: < Alternate-Protocol: 443:quic,p=0.02
HTTP            [DEBUG]: < 
HTTP            [DEBUG]: No data transfered
HTTP            [DEBUG]: Parking connection to www.googleapis.com:443 (id=30)

#2 Updated by Andreas Smas over 6 years ago

  • Status changed from New to Invalid

Also available in: Atom PDF