Permalink
Browse files

rename parsepost -> parsereq

  • Loading branch information...
1 parent 8864917 commit 3759e0e37de390ef86294aba2f088f4cdc92a916 @xcir committed Jun 10, 2012
Showing with 465 additions and 463 deletions.
  1. +1 −1 .gitignore
  2. +1 −1 COPYING
  3. +2 −2 Makefile.am
  4. +20 −18 README.rst
  5. +2 −2 configure.ac
  6. +7 −7 src/Makefile.am
  7. +9 −9 src/tests/cookie.php
  8. +9 −9 src/tests/get.php
  9. +9 −9 src/tests/post_urlencode.php
  10. +3 −3 src/tests/test_01_MAIN.vtc
  11. +7 −7 src/tests/test_01_POST_multipart.vtc
  12. +15 −15 src/tests/test_01_SEEK.vtc
  13. +9 −9 src/tests/test_COOKIE_00001.vtc
  14. +9 −9 src/tests/test_COOKIE_00002.vtc
  15. +9 −9 src/tests/test_COOKIE_00003.vtc
  16. +9 −9 src/tests/test_COOKIE_00004.vtc
  17. +9 −9 src/tests/test_COOKIE_00005.vtc
  18. +9 −9 src/tests/test_COOKIE_00006.vtc
  19. +9 −9 src/tests/test_COOKIE_00007.vtc
  20. +9 −9 src/tests/test_COOKIE_00008.vtc
  21. +9 −9 src/tests/test_COOKIE_00009.vtc
  22. +9 −9 src/tests/test_COOKIE_00010.vtc
  23. +9 −9 src/tests/test_GET_00001.vtc
  24. +9 −9 src/tests/test_GET_00002.vtc
  25. +9 −9 src/tests/test_GET_00003.vtc
  26. +9 −9 src/tests/test_GET_00004.vtc
  27. +9 −9 src/tests/test_GET_00005.vtc
  28. +9 −9 src/tests/test_GET_00006.vtc
  29. +9 −9 src/tests/test_GET_00007.vtc
  30. +9 −9 src/tests/test_GET_00008.vtc
  31. +9 −9 src/tests/test_GET_00009.vtc
  32. +9 −9 src/tests/test_GET_00010.vtc
  33. +9 −9 src/tests/test_GET_00011.vtc
  34. +9 −9 src/tests/test_GET_00012.vtc
  35. +9 −9 src/tests/test_GET_00013.vtc
  36. +9 −9 src/tests/test_GET_00014.vtc
  37. +9 −9 src/tests/test_GET_00015.vtc
  38. +9 −9 src/tests/test_GET_00016.vtc
  39. +9 −9 src/tests/test_POST-urlencode_00001.vtc
  40. +9 −9 src/tests/test_POST-urlencode_00002.vtc
  41. +9 −9 src/tests/test_POST-urlencode_00003.vtc
  42. +9 −9 src/tests/test_POST-urlencode_00004.vtc
  43. +9 −9 src/tests/test_POST-urlencode_00005.vtc
  44. +9 −9 src/tests/test_POST-urlencode_00006.vtc
  45. +9 −9 src/tests/test_POST-urlencode_00007.vtc
  46. +9 −9 src/tests/test_POST-urlencode_00008.vtc
  47. +9 −9 src/tests/test_POST-urlencode_00009.vtc
  48. +9 −9 src/tests/test_POST-urlencode_00010.vtc
  49. +9 −9 src/tests/test_POST-urlencode_00011.vtc
  50. +9 −9 src/tests/test_POST-urlencode_00012.vtc
  51. +9 −9 src/tests/test_POST-urlencode_00013.vtc
  52. +9 −9 src/tests/test_POST-urlencode_00014.vtc
  53. +9 −9 src/tests/test_POST-urlencode_00015.vtc
  54. +9 −9 src/{vmod_parsepost.c → vmod_parsereq.c}
  55. +1 −1 src/{vmod_req.h → vmod_parsereq.h}
  56. +1 −1 src/{vmod_parsepost.vcc → vmod_parsereq.vcc}
View
@@ -6,7 +6,7 @@ Makefile.in
*.lo
*.la
*~
-vmod_parsepost.3
+vmod_parsereq.3
/aclocal.m4
/autom4te.cache/
View
@@ -1,4 +1,4 @@
-libvmod-parsepost, easy rewrite for Varnish:
+libvmod-parsereq, easy rewrite for Varnish:
Copyright (c) 2012 Syohei Tanaka(@xcir)
File layout and configuration based on libvmod-example:
View
@@ -4,10 +4,10 @@ SUBDIRS = src
EXTRA_DIST = README.rst
-dist_man_MANS = vmod_parsepost.3
+dist_man_MANS = vmod_parsereq.3
MAINTAINERCLEANFILES = $(dist_man_MANS)
-vmod_parsepost.3: README.rst
+vmod_parsereq.3: README.rst
if HAVE_RST2MAN
${RST2MAN} README.rst $@
else
View
@@ -1,5 +1,5 @@
===================
-vmod_parsepost
+vmod_parsereq
===================
-------------------------------
@@ -14,7 +14,7 @@ Varnish parse post data module
SYNOPSIS
===========
-import parsepost;
+import parsereq;
DESCRIPTION
==============
@@ -42,15 +42,15 @@ Return value
Description
initialize.
- please write parsepost.init(); to 1st line in vcl_recv.
+ please write parsereq.init(); to 1st line in vcl_recv.
Example
::
- import parsepost;
+ import parsereq;
vcl_recv{
- parsepost.init();
+ parsereq.init();
}
errcode
@@ -81,10 +81,10 @@ Description
Example
::
- import parsepost;
+ import parsereq;
vcl_recv{
- if(parsepost.init()<1){
+ if(parsereq.init()<1){
...
@@ -117,7 +117,7 @@ Example
//vcl
vcl_deliver{
- set resp.http.hoge = parsepost.post_header("hoge");
+ set resp.http.hoge = parsereq.post_header("hoge");
}
//return
@@ -150,7 +150,7 @@ Example
//vcl
vcl_deliver{
- set resp.http.hoge = parsepost.post_body();
+ set resp.http.hoge = parsereq.post_body();
}
//return
@@ -183,10 +183,10 @@ Example
//vcl
vcl_deliver{
- set resp.http.n1 = parsepost.get_read_keylist();
- set resp.http.n2 = parsepost.get_read_keylist();
+ set resp.http.n1 = parsereq.get_read_keylist();
+ set resp.http.n2 = parsereq.get_read_keylist();
//nothing
- set resp.http.n3 = parsepost.get_read_keylist();
+ set resp.http.n3 = parsereq.get_read_keylist();
}
//return
@@ -219,13 +219,13 @@ Example
//vcl
vcl_deliver{
- set resp.http.n1 = parsepost.get_read_keylist();
- set resp.http.n2 = parsepost.get_read_keylist();
- parsepost.get_seek_reset();
- set resp.http.n3 = parsepost.get_read_keylist();
- set resp.http.n4 = parsepost.get_read_keylist();
+ set resp.http.n1 = parsereq.get_read_keylist();
+ set resp.http.n2 = parsereq.get_read_keylist();
+ parsereq.get_seek_reset();
+ set resp.http.n3 = parsereq.get_read_keylist();
+ set resp.http.n4 = parsereq.get_read_keylist();
//nothing
- set resp.http.n5 = parsepost.get_read_keylist();
+ set resp.http.n5 = parsereq.get_read_keylist();
}
//return
@@ -275,6 +275,8 @@ Tested Version
HISTORY
===========
+Version 0.5: rename module(parsepost -> parsereq)
+
Version 0.4: add get keylist function.
Version 0.3: support GET,COOKIE, modify interface.
View
@@ -1,8 +1,8 @@
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2012 Syohei Tanaka(@xcir)])
-AC_INIT([libvmod-parsepost], [trunk])
+AC_INIT([libvmod-parsereq], [trunk])
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SRCDIR(src/vmod_parsepost.vcc)
+AC_CONFIG_SRCDIR(src/vmod_parsereq.vcc)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
View
@@ -1,17 +1,17 @@
INCLUDES = -I$(VARNISHSRC)/include -I$(VARNISHSRC)
vmoddir = $(VMODDIR)
-vmod_LTLIBRARIES = libvmod_parsepost.la
+vmod_LTLIBRARIES = libvmod_parsereq.la
-libvmod_parsepost_la_LDFLAGS = -module -export-dynamic -avoid-version
+libvmod_parsereq_la_LDFLAGS = -module -export-dynamic -avoid-version
-libvmod_parsepost_la_SOURCES = \
+libvmod_parsereq_la_SOURCES = \
vcc_if.c \
vcc_if.h \
- vmod_parsepost.c
+ vmod_parsereq.c
-vcc_if.c vcc_if.h: $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod_parsepost.vcc
- @PYTHON@ $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod_parsepost.vcc
+vcc_if.c vcc_if.h: $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod_parsereq.vcc
+ @PYTHON@ $(VARNISHSRC)/lib/libvmod_std/vmod.py $(top_srcdir)/src/vmod_parsereq.vcc
VMOD_TESTS = tests/*.vtc
.PHONY: $(VMOD_TESTS)
@@ -22,7 +22,7 @@ tests/*.vtc:
check: $(VMOD_TESTS)
EXTRA_DIST = \
- vmod_parsepost.vcc \
+ vmod_parsereq.vcc \
$(VMOD_TESTS)
CLEANFILES = $(builddir)/vcc_if.c $(builddir)/vcc_if.h
View
@@ -23,19 +23,19 @@
} -start
varnish v1 -vcl+backend {
- import parsepost from "\${vmod_topbuild}/src/.libs/libvmod_parsepost.so";
+ import parsereq from "\${vmod_topbuild}/src/.libs/libvmod_parsereq.so";
sub vcl_recv {
- parsepost.init();
+ parsereq.init();
}
sub vcl_deliver{
- set resp.http.a = parsepost.cookie_header("a");
- set resp.http.b = parsepost.cookie_header("b");
- set resp.http.c = parsepost.cookie_header("c");
- set resp.http.d = parsepost.cookie_header("d");
- set resp.http.none = parsepost.cookie_header("");
- set resp.http.amulti = parsepost.cookie_header("a[]");
- set resp.http.raw = parsepost.cookie_body();
+ set resp.http.a = parsereq.cookie_header("a");
+ set resp.http.b = parsereq.cookie_header("b");
+ set resp.http.c = parsereq.cookie_header("c");
+ set resp.http.d = parsereq.cookie_header("d");
+ set resp.http.none = parsereq.cookie_header("");
+ set resp.http.amulti = parsereq.cookie_header("a[]");
+ set resp.http.raw = parsereq.cookie_body();
}
} -start
View
@@ -29,20 +29,20 @@
} -start
varnish v1 -vcl+backend {
- import parsepost from "\${vmod_topbuild}/src/.libs/libvmod_parsepost.so";
+ import parsereq from "\${vmod_topbuild}/src/.libs/libvmod_parsereq.so";
sub vcl_recv {
- parsepost.init();
+ parsereq.init();
}
sub vcl_deliver{
- set resp.http.a = parsepost.get_header("a");
- set resp.http.b = parsepost.get_header("b");
- set resp.http.c = parsepost.get_header("c");
- set resp.http.d = parsepost.get_header("d");
- set resp.http.none = parsepost.get_header("");
- set resp.http.amulti = parsepost.get_header("a[]");
- set resp.http.raw = parsepost.get_body();
+ set resp.http.a = parsereq.get_header("a");
+ set resp.http.b = parsereq.get_header("b");
+ set resp.http.c = parsereq.get_header("c");
+ set resp.http.d = parsereq.get_header("d");
+ set resp.http.none = parsereq.get_header("");
+ set resp.http.amulti = parsereq.get_header("a[]");
+ set resp.http.raw = parsereq.get_body();
}
} -start
@@ -28,19 +28,19 @@
} -start
varnish v1 -vcl+backend {
- import parsepost from "\${vmod_topbuild}/src/.libs/libvmod_parsepost.so";
+ import parsereq from "\${vmod_topbuild}/src/.libs/libvmod_parsereq.so";
sub vcl_recv {
- parsepost.init();
+ parsereq.init();
}
sub vcl_deliver{
- set resp.http.a = parsepost.post_header("a");
- set resp.http.b = parsepost.post_header("b");
- set resp.http.c = parsepost.post_header("c");
- set resp.http.d = parsepost.post_header("d");
- set resp.http.none = parsepost.post_header("");
- set resp.http.amulti = parsepost.post_header("a[]");
- set resp.http.raw = parsepost.post_body();
+ set resp.http.a = parsereq.post_header("a");
+ set resp.http.b = parsereq.post_header("b");
+ set resp.http.c = parsereq.post_header("c");
+ set resp.http.d = parsereq.post_header("d");
+ set resp.http.none = parsereq.post_header("");
+ set resp.http.amulti = parsereq.post_header("a[]");
+ set resp.http.raw = parsereq.post_body();
}
} -start
@@ -6,13 +6,13 @@ server s1 {
} -start
varnish v1 -vcl+backend {
- import parsepost from "${vmod_topbuild}/src/.libs/libvmod_parsepost.so";
+ import parsereq from "${vmod_topbuild}/src/.libs/libvmod_parsereq.so";
sub vcl_recv {
- parsepost.init();
+ parsereq.init();
}
sub vcl_deliver{
- set resp.http.stat = parsepost.errcode();
+ set resp.http.stat = parsereq.errcode();
}
} -start
@@ -6,17 +6,17 @@ server s1 {
} -start
varnish v1 -vcl+backend {
- import parsepost from "${vmod_topbuild}/src/.libs/libvmod_parsepost.so";
+ import parsereq from "${vmod_topbuild}/src/.libs/libvmod_parsereq.so";
sub vcl_recv {
- parsepost.init();
+ parsereq.init();
}
sub vcl_deliver{
- set resp.http.a = parsepost.post_header("a");
- set resp.http.b = parsepost.post_header("b");
- set resp.http.c = parsepost.post_header("c");
- set resp.http.d = parsepost.post_header("d");
- if(parsepost.post_body()){
+ set resp.http.a = parsereq.post_header("a");
+ set resp.http.b = parsereq.post_header("b");
+ set resp.http.c = parsereq.post_header("c");
+ set resp.http.d = parsereq.post_header("d");
+ if(parsereq.post_body()){
set resp.http.run = 1;
}
}
View
@@ -6,13 +6,13 @@ server s1 {
} -start
varnish v1 -vcl+backend {
- import parsepost from "${vmod_topbuild}/src/.libs/libvmod_parsepost.so";
+ import parsereq from "${vmod_topbuild}/src/.libs/libvmod_parsereq.so";
sub vcl_recv {
- parsepost.init();
+ parsereq.init();
}
sub vcl_deliver{
- set resp.http.stat = parsepost.errcode();
+ set resp.http.stat = parsereq.errcode();
set resp.http.po = "";
set resp.http.go = "";
set resp.http.co = "";
@@ -23,30 +23,30 @@ varnish v1 -vcl+backend {
C{
const char *vpo;
while(1){
- vpo = Vmod_Func_parsepost.post_read_keylist(sp);
+ vpo = Vmod_Func_parsereq.post_read_keylist(sp);
if(!vpo) break;
VRT_SetHdr(sp, HDR_RESP, "\003po:",VRT_GetHdr(sp, HDR_RESP, "\003po:"),"1",vrt_magic_string_end);
}
while(1){
- vpo = Vmod_Func_parsepost.get_read_keylist(sp);
+ vpo = Vmod_Func_parsereq.get_read_keylist(sp);
if(!vpo) break;
VRT_SetHdr(sp, HDR_RESP, "\003go:",VRT_GetHdr(sp, HDR_RESP, "\003go:"),"1",vrt_magic_string_end);
}
while(1){
- vpo = Vmod_Func_parsepost.cookie_read_keylist(sp);
+ vpo = Vmod_Func_parsereq.cookie_read_keylist(sp);
if(!vpo) break;
VRT_SetHdr(sp, HDR_RESP, "\003co:",VRT_GetHdr(sp, HDR_RESP, "\003co:"),"1",vrt_magic_string_end);
}
- Vmod_Func_parsepost.post_seek_reset(sp);
- Vmod_Func_parsepost.get_seek_reset(sp);
- Vmod_Func_parsepost.cookie_seek_reset(sp);
+ Vmod_Func_parsereq.post_seek_reset(sp);
+ Vmod_Func_parsereq.get_seek_reset(sp);
+ Vmod_Func_parsereq.cookie_seek_reset(sp);
unsigned fl;
fl = 0;
while(1){
- vpo = Vmod_Func_parsepost.post_read_keylist(sp);
+ vpo = Vmod_Func_parsereq.post_read_keylist(sp);
if(!vpo && !fl){
- Vmod_Func_parsepost.post_seek_reset(sp);
+ Vmod_Func_parsereq.post_seek_reset(sp);
fl = 1;
continue;
}else if(!vpo){
@@ -57,9 +57,9 @@ varnish v1 -vcl+backend {
fl = 0;
while(1){
- vpo = Vmod_Func_parsepost.get_read_keylist(sp);
+ vpo = Vmod_Func_parsereq.get_read_keylist(sp);
if(!vpo && !fl){
- Vmod_Func_parsepost.get_seek_reset(sp);
+ Vmod_Func_parsereq.get_seek_reset(sp);
fl = 1;
continue;
}else if(!vpo){
@@ -70,9 +70,9 @@ varnish v1 -vcl+backend {
fl = 0;
while(1){
- vpo = Vmod_Func_parsepost.cookie_read_keylist(sp);
+ vpo = Vmod_Func_parsereq.cookie_read_keylist(sp);
if(!vpo && !fl){
- Vmod_Func_parsepost.cookie_seek_reset(sp);
+ Vmod_Func_parsereq.cookie_seek_reset(sp);
fl = 1;
continue;
}else if(!vpo){
Oops, something went wrong.

0 comments on commit 3759e0e

Please sign in to comment.