I have been trying to set up squid 3.5.27 on a windows box using the store-id-program setting.
However, it seems that however I set it up the python script I'm running immediately gets end-of-input (as can be seen by adding trace) and then squid stops running, complaining
Squid Cache (Version 3.5.27): Terminated abnormally. FATAL: The store_id helpers are crashing too rapidly, need help!
I've tried all sorts of variants (not at the same time obviously):
store_id_program /cygdrive/c/apps/squid/local/bin/texture_rewrite.bat store_id_program /cygdrive/c/apps/squid/local/bin/texture_rewrite.py store_id_program /cygdrive/c/apps/Python27/python.exe -u c:\apps\squid\local\bin\texture_rewrite.py
(The .bat file consists of
@<path-to-python> -u <path to script>)
Squid works fine if I don't try setting up url rewriting.
For reference the python script looks like this:
while True: line = sys.stdin.readline() print >>sys.stderr, line if not line: break line = line.strip() if line != '': process(line) print >>sys.stderr, 'exit'
process(line) never gets called