[jira] [Commented] (TS-621) 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
[ https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034514#comment-13034514 ] Leif Hedstrom commented on TS-621: -- Grrr, even if I "fix" this is HttpTunnel.cc, it doesn't work. What's even more strange, I compared the tracers on http.* with this "fix" and a 0-length body, and stock trunk and a normal size body, and the tracers are now identical (without my hack fix, it differed since it'd call the VC_EVENT_WRITE_COMPLETE event way early). But something else is still preventing it from caching it :/. > 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
[jira] [Commented] (TS-621) 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
[ https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034494#comment-13034494 ] Leif Hedstrom commented on TS-621: -- Actually, I suspect it's in HttpTunnel.cc:846: {code} if (c_write == 0) { // Nothing to do, call back the cleanup handlers c->write_vio = NULL; consumer_handler(VC_EVENT_WRITE_COMPLETE, c); } else { c->write_vio = c->vc->do_io_write(this, c_write, c->buffer_reader); ink_assert(c_write > 0); } c = c->link.next; } {code} I *think* this makes some sense actually :) > 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
[jira] [Issue Comment Edited] (TS-621) 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
[ https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034490#comment-13034490 ] Leif Hedstrom edited comment on TS-621 at 5/17/11 1:32 AM: --- Took a quick look at this, nothing obvious comes to mind, yet. I did notice the event (VC_EVENT_WRITE_COMPLETE) originates from UnixNetVConnection.cc:476: {code} if (s->vio.ntodo() <= 0) { write_signal_done(VC_EVENT_WRITE_COMPLETE, nh, vc); return; } else if (!signalled) { {code} was (Author: zwoop): Took a quick look at this, nothing obvious comes to mind, yet. I did notice the event (VC_EVENT_WRITE_COMPLETE) originates from UnixNetVConnection.cc:476: if (s->vio.ntodo() <= 0) { write_signal_done(VC_EVENT_WRITE_COMPLETE, nh, vc); return; } else if (!signalled) { > 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
[jira] [Commented] (TS-621) 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
[ https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034490#comment-13034490 ] Leif Hedstrom commented on TS-621: -- Took a quick look at this, nothing obvious comes to mind, yet. I did notice the event (VC_EVENT_WRITE_COMPLETE) originates from UnixNetVConnection.cc:476: if (s->vio.ntodo() <= 0) { write_signal_done(VC_EVENT_WRITE_COMPLETE, nh, vc); return; } else if (!signalled) { > 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
[jira] [Commented] (TS-621) 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
[ 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 3159if (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
[jira] [Commented] (TS-621) 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
[ https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034408#comment-13034408 ] John Plevyak commented on TS-621: - lol, my testing tool treats 0 length as varied testing now. john > 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
[jira] [Commented] (TS-621) 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
[ https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034400#comment-13034400 ] Leif Hedstrom commented on TS-621: -- John: I tried this patch, and it doesn't seem to have any negative effects either in standalone or clustermode. However, zero-length body responses are still not cacheable. Do we also need to make some changes to the HttpSM for that to work ? > 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
[jira] [Updated] (TS-621) 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
[ https://issues.apache.org/jira/browse/TS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Plevyak updated TS-621: Attachment: ts-621-jp-1.patch Initial version. Give it a shot. > 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
[jira] [Resolved] (TS-786) Add a perl module to edit a records.config configuration file
[ https://issues.apache.org/jira/browse/TS-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leif Hedstrom resolved TS-786. -- Resolution: Fixed > Add a perl module to edit a records.config configuration file > - > > Key: TS-786 > URL: https://issues.apache.org/jira/browse/TS-786 > Project: Traffic Server > Issue Type: New Feature > Components: Configuration >Reporter: Leif Hedstrom >Assignee: Leif Hedstrom > Fix For: 2.1.9 > > > This is a very simple module, but lets you do small scripts, that takes a > records.config from a new installation, and apply your changes. And this can > be done repeatedly (e.g. for new / updated ATS installations etc.). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (TS-786) Add a perl module to edit a records.config configuration file
Add a perl module to edit a records.config configuration file - Key: TS-786 URL: https://issues.apache.org/jira/browse/TS-786 Project: Traffic Server Issue Type: New Feature Components: Configuration Reporter: Leif Hedstrom Assignee: Leif Hedstrom Fix For: 2.1.9 This is a very simple module, but lets you do small scripts, that takes a records.config from a new installation, and apply your changes. And this can be done repeatedly (e.g. for new / updated ATS installations etc.). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira