From 5d1b008fc9f8b626509a948fee27d5587a70c1e0 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 7 Jul 2009 16:28:56 -0400 Subject: [PATCH] xavante: hacked to not turn validly empty responses into 204 --- lua/xavante/204.patch | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua/xavante/204.patch diff --git a/lua/xavante/204.patch b/lua/xavante/204.patch new file mode 100644 index 000000000..5cf13deff --- /dev/null +++ b/lua/xavante/204.patch @@ -0,0 +1,37 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../xavante/204.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- ./src/xavante/httpd.lua.orig 2009-06-02 17:21:38.000000000 +0200 ++++ ./src/xavante/httpd.lua 2009-06-02 18:16:08.000000000 +0200 +@@ -4,6 +4,8 @@ + -- Authors: Javier Guerra and Andre Carregal + -- Copyright (c) 2004-2007 Kepler Project + -- ++-- vim:set ts=4 sw=4 et: ++-- + -- $Id: httpd.lua,v 1.44 2009/02/11 20:56:15 carregal Exp $ + ----------------------------------------------------------------------------- + +@@ -259,7 +261,8 @@ + res.headers["Content-Length"] = string.len (res.content) + end + end +- else ++ elseif res.statusline == "HTTP/1.1 200 OK" or res.statusline == "HTTP/1.1 OK" then ++ -- only turn 200s into 204s + if not res.sent_headers then + res.statusline = "HTTP/1.1 204 No Content" + res.headers["Content-Length"] = 0