Support additional HTTP redirections (303 and 307).
"yes please" martynas@
This commit is contained in:
parent
41cc379d59
commit
86c737044b
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.14 2008/06/11 05:04:37 landry Exp $
|
||||
# $OpenBSD: Makefile,v 1.15 2008/11/04 04:06:45 jsg Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= network support for the lua language
|
||||
DISTNAME= luasocket-2.0.1
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
PKGNAME= ${DISTNAME}p2
|
||||
CATEGORIES= net
|
||||
|
||||
MASTER_SITES= http://luaforge.net/frs/download.php/1589/
|
||||
|
12
net/luasocket/patches/patch-src_http_lua
Normal file
12
net/luasocket/patches/patch-src_http_lua
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_http_lua,v 1.1 2008/11/04 04:06:45 jsg Exp $
|
||||
--- src/http.lua.orig Mon Nov 3 23:17:12 2008
|
||||
+++ src/http.lua Mon Nov 3 23:17:57 2008
|
||||
@@ -242,7 +242,7 @@ local function shouldredirect(reqt, code, headers)
|
||||
return headers.location and
|
||||
string.gsub(headers.location, "%s", "") ~= "" and
|
||||
(reqt.redirect ~= false) and
|
||||
- (code == 301 or code == 302) and
|
||||
+ (code == 301 or code == 302 or code == 303 or code == 307) and
|
||||
(not reqt.method or reqt.method == "GET" or reqt.method == "HEAD")
|
||||
and (not reqt.nredirects or reqt.nredirects < 5)
|
||||
end
|
Loading…
Reference in New Issue
Block a user