Skip to content

Instantly share code, notes, and snippets.

View xcir's full-sized avatar
💭
🐇🐇🐇

Shohei Tanaka xcir

💭
🐇🐇🐇
View GitHub Profile
@xcir
xcir / gist:3933140
Created October 22, 2012 18:20
iterate i/f(draft)
//vmod.vcc
Function STRING filter_a()
Function STRING filter_b()
//vmod.c
void filter_a(const char* c){
syslog(6,"hello(A):%s",c);
}
void filter_b(const char* c){
syslog(6,"hello(B):%s",c);
VMOD
https://github.com/xcir/libvmod-parsereq/tree/future-iterate
-----------------------
--vcl
import std;
import parsereq;
backend default {
.host = "127.0.0.1";
.port = "81";
https://github.com/xcir/libvmod-parsereq/tree/future-iterate
--vcl
import std;
import parsereq;
sub test{
parsereq.next_offset(req);
if(parsereq.current_key(req) != "hoge"){
set req.http.hoge = req.http.hoge + parsereq.current_key(req) + "("+parsereq.size(req,parsereq.current_key(req)) +"):";
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index 208db11..8b942ac 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -490,28 +490,30 @@ receive_frame(void *priv) {
vtc_log(hp->vl, 4, "s%lu - stream->dependency: %u", s->id, s->dependency);
vtc_log(hp->vl, 4, "s%lu - stream->weight: %u", s->id, s->weight);
}
- iter = HPK_NewIter(s->hp->inctx, f->data + delta, f->size - delta);
-