[
https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034424#comment-13034424
]
John Plevyak commented on TS-621:
---------------------------------
yes, the HTTP state machine needs some more changes, and these are beyond me.
I changed it so that it make the correct calls to the cache, but it seems that
content-length of 0 is hard-wired into HttpSM as an error. The problem emerges
in this=0x7fffea3e01c0, event=103, c=0x7fffea3e1f40) at HttpSM.cc:3162
3162 c->vc->do_io_close(EHTTP_ERROR);
(gdb) list
3157 // we got a truncated header from the origin server
3158 // but decided to accpet it anyways
3159 if (c->write_vio == NULL) {
3160 *status_ptr = HttpTransact::CACHE_WRITE_ERROR;
3161 c->write_success = false;
3162 c->vc->do_io_close(EHTTP_ERROR);
3163 } else {
3164 *status_ptr = HttpTransact::CACHE_WRITE_COMPLETE;
3165 c->write_success = true;
3166 c->write_vio = c->vc->do_io(VIO::CLOSE);
It seems that c->write_vio is NULL which causes the HttpSM to close the cache
with an error....
It is easy to test... just put a breakpoint in CacheVC::openWriteClose
The close should be without error.
> writing 0 bytes to the HTTP cache means only update the header... need a new
> API: update_header_only() to allow 0 byte files to be cached
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TS-621
> URL: https://issues.apache.org/jira/browse/TS-621
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cache
> Affects Versions: 2.1.5
> Reporter: John Plevyak
> Assignee: John Plevyak
> Fix For: 2.1.9
>
> Attachments: ts-621-jp-1.patch
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira