This is fantastic, and will definitely be used :) Great work agentzh!by dylanz - Nginx Mailing List - English
agentzh Wrote: ------------------------------------------------------- > On Wed, Dec 23, 2009 at 8:36 AM, dylanz wrote: > > location /first { > > echo "before"; > > echo_location_aysnc /second$request_uri; > > echo "after" > > } > > > > location /second(.*)\?(.*)^ { > > set $memcached_key $1; # needing thisby dylanz - Nginx Mailing List - English
Gotcha. Thanks Marcus, that makes perfect sense. In regard to echo_location_async, I'm assuming it would allow something like so? location /first { echo "before"; echo_location_aysnc /second$request_uri; echo "after" } location /second(.*)\?(.*)^ { set $memcached_key $1; # needing this to be keyed on the request_path, not the entire uri memcached_passby dylanz - Nginx Mailing List - English
Hey agentzh! I noticed that "echo" isn't outputting on non-async events, for example: echo "before"; set $memcached_key $uri; memcached_pass 127.0.0.1:11211; echo "after"; That results in the contents of the memcached_pass, but doesn't include the echo output. I tried throwing in some echo_flush commands to see if that would help, but it didn't. Howeby dylanz - Nginx Mailing List - English
/* append the newline character */ /* TODO add support for -n option to suppressby dylanz - Nginx Mailing List - English
This is probably going to work, but, need that "-n" feature that Marcus suggested. Is this a valid feature request? If so, I'd be happy to add it to the module. agentzh, let me know what you think :)by dylanz - Nginx Mailing List - English
The echo module may be the ticket indeed! Thanks for the heads up, and I'll keep you both posted :)by dylanz - Nginx Mailing List - English
Hey agentzh! Oooo... I like the generalization of the XSS proposition, and I'd love to hear what ideas you have in store. I'm going to play with the SSI module this week and see if it can solve my problems, but if it can't, I'm going to have to move forward with that body filter. Ping me off the thread (dylans (.at.) gmail.com), and we can chat!by dylanz - Nginx Mailing List - English
I'll give that a whirl, and other combinations if that won't work. If I run into any brick walls, or get crafty and create that body filter, I'll definitely post back here with the outcome. Thank you very much for your guidance thus far!by dylanz - Nginx Mailing List - English
Yep, I think you got it ;) So on the first request to this URI: http://example.com/blah/9999999.json?callback=ding1111111 ... we may set the following data in Memcached for that resource: key: /blah/9999999.json value: john: {age: 20, gender: 'male'} The next request to the same resource may look like this: http://example.com/blah/9999999.json?callback=ding2222222 ... so sinceby dylanz - Nginx Mailing List - English
Hello Peter! Thank you for the great suggestion, and after I read up on the SSI module, I think I understand the approach. So, the actual content I store in the cache would be something like: <!--# include virtual="http://example.com/jsonp_ssi/$args" -->({"cat": meow, "dog": ruff}) On a subsequent request, that content would be retrieved, and replacedby dylanz - Nginx Mailing List - English
Hello! We have an API which makes heavy use of JSONP. In context, that means the body of the response from our API must be wrapped in a callback parameter that's passed in the same request. We currently store the JSON output from our API in Memcached, and on subsequent requests, we jump into our application, pull the JSON output out of Memcached, wrap the output in the callback parameter, aby dylanz - Nginx Mailing List - English