Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/httpd fold long line in a readable way; pass nil as ...
details: https://anonhg.NetBSD.org/src/rev/061f1ef7906b
branches: trunk
changeset: 790546:061f1ef7906b
user: mbalmer <mbalmer%NetBSD.org@localhost>
date: Thu Oct 17 08:07:54 2013 +0000
description:
fold long line in a readable way; pass nil as query table if reading form data fails
diffstat:
libexec/httpd/lua-bozo.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r bf9837b4f517 -r 061f1ef7906b libexec/httpd/lua-bozo.c
--- a/libexec/httpd/lua-bozo.c Thu Oct 17 07:54:19 2013 +0000
+++ b/libexec/httpd/lua-bozo.c Thu Oct 17 08:07:54 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lua-bozo.c,v 1.4 2013/10/17 07:54:19 mbalmer Exp $ */
+/* $NetBSD: lua-bozo.c,v 1.5 2013/10/17 08:07:54 mbalmer Exp $ */
/*
* Copyright (c) 2013 Marc Balmer <marc%msys.ch@localhost>
@@ -403,8 +403,8 @@
headp->h_value);
/* Pass the query variables */
- if ((query && *query) || (type && *type
- && !strcmp(type, FORM))) {
+ if ((query && *query) ||
+ (type && *type && !strcmp(type, FORM))) {
lua_newtable(map->L);
if (query && *query)
lua_decode_query(map->L, query);
@@ -420,6 +420,9 @@
content[n] = '\0';
lua_decode_query(map->L,
content);
+ } else {
+ lua_pop(map->L, 1);
+ lua_pushnil(map->L);
}
free(content);
}
Home |
Main Index |
Thread Index |
Old Index