Skip to content

Instantly share code, notes, and snippets.

View yirkha's full-sized avatar

Jiří Hruška yirkha

View GitHub Profile
@yirkha
yirkha / 0001-Reply-with-201-Created-status-when-publishing.patch
Created August 27, 2013 15:12
nginx-push-stream-module patch: Reply with "201 Created" status when publishing
From f220b93a77e63a8edea52bae7ff5786fa032f11e Mon Sep 17 00:00:00 2001
From: Jiri Hruska <jirka@fud.cz>
Date: Mon, 24 Jun 2013 13:06:53 +0200
Subject: [PATCH] Reply with "201 Created" status when publishing
From HTTP/1.1 RFC2616: "If a resource has been created on the origin server,
the response SHOULD be 201 (Created)." This also seems to be a common
behavior on REST interfaces and the original ngx_http_push_module did this.
---
include/ngx_http_push_stream_module.h | 2 +-
@yirkha
yirkha / 0001-Fix-keep-alive-on-long-polling-connections.patch
Created August 27, 2013 15:02
nginx-push-stream-module patch: Fix keep-alive on long-polling connections
From 06f7edbd4f460cd50d03dbf484fadfb4faf11d82 Mon Sep 17 00:00:00 2001
From: Jiri Hruska <jirka@fud.cz>
Date: Mon, 24 Jun 2013 03:02:52 +0200
Subject: [PATCH] Fix keep-alive on long-polling connections
Since 3477fe92, chunked_transfer_encoding is forced to off in function
ngx_http_push_stream_setup_handler() to avoid some memory leaks on streaming
connections. This bug has been probably fixed in the core since that
(http://hg.nginx.org/nginx/rev/a28ba1cdec27), but the local chunking of all
subscriber-side bodies is still being used.