![]() |
| | #1 |
| Registered User Join Date: Mar 2005 Location: Juneda
Posts: 224
| Manage internal errors on HTTP Suppose that the server transmits a file (non chunked): first send the http header and then start sending the content; but before finish sending the file content it occurs an error (i.e.)while reading from the file. There's the problem: if I send a new http header specifying the error, that header will be interpreted as a part of the file; and if I kill the conection (graceful or abortive shutdown) without any information, the client will only know that the conection has been closed and will assume that if the content size is minor than the content-length specifyed in the header some problem should happened (but will be only a pressumption). What is the correct way in those cases? Thank's in advance Niara |
| Niara is offline | |
| | #2 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| I think you've already come up with the correct answer. The server should close the connection. This will tell the client that there was an error as long as the bytes transferred is less than the content-length passed in the header. |
| bithub is offline | |
| | #3 |
| Registered User Join Date: Mar 2005 Location: Juneda
Posts: 224
| Hello bithub, thank's for the help and your time. I'll do in that way. Also I have been searching and reading a bit more and I found the Out Of Band data, but I'm not sure if they are for that purpose or if I can use it in whatever conection. That's difficult to me, so for the moment I'll close de connection and problem solved ![]() Thank's. Niara |
| Niara is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Http 502 and 503 errors | George2 | C# Programming | 1 | 07-18-2008 03:21 AM |
| Internal Compiler Error | Elysia | C++ Programming | 20 | 07-05-2008 03:59 AM |
| global namespace errors | stubaan | C++ Programming | 9 | 04-02-2008 03:11 PM |
| errors in class(urgent ) | ayesha | C++ Programming | 1 | 11-10-2001 10:14 PM |
| errors in class(urgent) | ayesha | C++ Programming | 2 | 11-10-2001 06:51 PM |