diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2011-11-30 17:28:54 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2011-12-01 16:01:11 -0800 |
commit | ac6cda955c6859d57ba1a705ac1c2786a16b8b14 (patch) | |
tree | 3a87fc433656e0bfe89f619b2bd1174ceb9f27ff /org.eclipse.jgit | |
parent | 0d61707f12b5b1a94b325fc8c2975a9e60a14dac (diff) | |
download | jgit-ac6cda955c6859d57ba1a705ac1c2786a16b8b14.tar.gz jgit-ac6cda955c6859d57ba1a705ac1c2786a16b8b14.zip |
Ensure all smart HTTP errors are sent to clients
Error messages are typically short, below the 32 KiB in-memory buffer
size of the SmartOutputStream. When an error is queued up for sending
to a client and an exception is thrown up into the servlet handler we
discarded the message and sent nothing to the client, as the messages
were stuck inside of the SmartOutputStream buffer.
Hoist the creation of the output stream above the invocation of try
block of the service, and use close() in the few catch blocks that
assume there are buffered messages ready for transmission. This will
ensure errors from unpacking a stream in ReceivePack are sent off to
a client correctly, as previously these were causing no status report
to arrive at the client side as the data was stuck in the buffer.
Change-Id: I5534b560697731121f48979ae077aa7c95b8e39c
Diffstat (limited to 'org.eclipse.jgit')
0 files changed, 0 insertions, 0 deletions