Received: (qmail 80109 invoked by uid 501); 3 May 2001 15:06:39 -0000 Message-Id: <20010503150639.80108.qmail@apache.org> Date: 3 May 2001 15:06:39 -0000 From: hafid rachid Reply-To: rachid.hafid@creditlyonnais.fr To: submit@bugz.apache.org Subject: No content-type is sent in http headers by the Apache proxy when the CacheMaxExpire value expires. X-Send-Pr-Version: 3.110 >Number: 7669 >Category: mod_proxy >Synopsis: No content-type is sent in http headers by the Apache proxy when the CacheMaxExpire value expires. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu May 03 08:10:01 PDT 2001 >Closed-Date: >Last-Modified: Tue Jun 12 08:20:05 PDT 2001 >Originator: rachid.hafid@creditlyonnais.fr >Release: 1.3.19 >Organization: apache >Environment: Windows NT4 SP5 OS2 Warp4 Fix 10 >Description: When the Apache proxy checks the validity of a document that is in it's cache and when it sends that document to a client, it doesn't point out the mime type of the document. No content-type is included in the http headers response. ----------------------- IP HEADER ----------------------- IP: Version: 4 Correct Header Length: 20 bytes IP: Type Of Service: 00 IP: 000. .... Routine IP: ...0 .... Normal Delay IP: .... 0... Normal Throughput IP: .... .0.. Normal Reliability IP: Total Len: 363 (x16B) bytes Id: 699B IP: Flags: 2 IP: .1.. Don't Fragment IP: ..0. Last Fragment IP: Fragment Offset: 000 IP: Time To Live: 64 sec Protocol: 6 TCP IP: Header Checksum: F353 (Correct) IP: No Options ---------------------- TCP HEADER ---------------------- TCP: Source Port: 51705 (Unassigned port) Dest Port: 80 (Unassigned port) TCP: Sequence #: 2962969497 TCP: Ack #: 2004704920 TCP: Offset: 20 bytes TCP: Flags: 18 TCP: ..0. .... Urgent bit Off TCP: ...1 .... Ack bit On TCP: .... 1... Push bit On TCP: .... .0.. Reset bit Off TCP: .... ..0. Synchronize bit Off TCP: .... ...0 Finish bit Off TCP: Window: 33580 Checksum: 7D4D (Correct) TCP: No Options --------------------------------- DATA ----------------------------------- 0000 47 45 54 20 68 74 74 70 3A 2F 2F 6C 6F 63 61 6C GET http://local 0010 2F 70 64 66 2F 61 73 63 65 6E 74 2E 70 64 66 20 /pdf/ascent.pdf 0020 48 54 54 50 2F 31 2E 30 0D 0A 52 65 66 65 72 65 HTTP/1.0..Refere 0030 72 3A 20 68 74 74 70 3A 2F 2F 6C 6F 63 61 6C 2F r: http://local/ 0040 70 64 66 2F 69 6E 64 65 78 2E 68 74 6D 6C 0D 0A pdf/index.html.. 0050 50 72 6F 78 79 2D 43 6F 6E 6E 65 63 74 69 6F 6E Proxy-Connection 0060 3A 20 4B 65 65 70 2D 41 6C 69 76 65 0D 0A 55 73 : Keep-Alive..Us 0070 65 72 2D 41 67 65 6E 74 3A 20 4D 6F 7A 69 6C 6C er-Agent: Mozill 0080 61 2F 34 2E 36 31 20 5B 66 72 5D 20 28 4F 53 2F a/4.61 [fr] (OS/ 0090 32 3B 20 55 29 0D 0A 48 6F 73 74 3A 20 6C 6F 63 2; U)..Host: loc 00A0 61 6C 0D 0A 41 63 63 65 70 74 3A 20 69 6D 61 67 al..Accept: imag 00B0 65 2F 67 69 66 2C 20 69 6D 61 67 65 2F 78 2D 78 e/gif, image/x-x 00C0 62 69 74 6D 61 70 2C 20 69 6D 61 67 65 2F 6A 70 bitmap, image/jp 00D0 65 67 2C 20 69 6D 61 67 65 2F 70 6A 70 65 67 2C eg, image/pjpeg, 00E0 20 69 6D 61 67 65 2F 70 6E 67 2C 20 2A 2F 2A 0D image/png, */*. 00F0 0A 41 63 63 65 70 74 2D 45 6E 63 6F 64 69 6E 67 .Accept-Encoding 0100 3A 20 67 7A 69 70 0D 0A 41 63 63 65 70 74 2D 4C : gzip..Accept-L 0110 61 6E 67 75 61 67 65 3A 20 66 72 0D 0A 41 63 63 anguage: fr..Acc 0120 65 70 74 2D 43 68 61 72 73 65 74 3A 20 69 73 6F ept-Charset: iso 0130 2D 38 38 35 39 2D 31 2C 2A 2C 75 74 66 2D 38 0D -8859-1,*,utf-8. 0140 0A 0D 0A ... -------------------------- #:5 -------------------------- Delta Time: 0.016sec Packet Length: 1500 bytes (5DC hex) IP: Dest: 010.008.099.072 Source: 010.008.101.070 ----------------------- IP HEADER ----------------------- IP: Version: 4 Correct Header Length: 20 bytes IP: Type Of Service: 00 IP: 000. .... Routine IP: ...0 .... Normal Delay IP: .... 0... Normal Throughput IP: .... .0.. Normal Reliability IP: Total Len: 1500 (x5DC) bytes Id: 005D IP: Flags: 2 IP: .1.. Don't Fragment IP: ..0. Last Fragment IP: Fragment Offset: 000 IP: Time To Live: 64 sec Protocol: 6 TCP IP: Header Checksum: 5821 (Correct) IP: No Options ---------------------- TCP HEADER ---------------------- TCP: Source Port: 80 (Unassigned port) Dest Port: 51705 (Unassigned port) TCP: Sequence #: 2004704920 TCP: Ack #: 2962969820 TCP: Offset: 20 bytes TCP: Flags: 10 TCP: ..0. .... Urgent bit Off TCP: ...1 .... Ack bit On TCP: .... 0... Push bit Off TCP: .... .0.. Reset bit Off TCP: .... ..0. Synchronize bit Off TCP: .... ...0 Finish bit Off TCP: Window: 33580 Checksum: E0A8 (Correct) TCP: No Options --------------------------------- DATA ----------------------------------- 0000 48 54 54 50 2F 31 2E 30 20 32 30 30 20 44 6F 63 HTTP/1.0 200 Doc 0010 75 6D 65 6E 74 20 66 6F 6C 6C 6F 77 73 0D 0A 56 ument follows..V 0020 69 61 3A 20 31 2E 31 20 50 52 4F 58 59 0D 0A 44 ia: 1.1 PROXY..D 0030 61 74 65 3A 20 54 68 75 2C 20 30 33 20 4D 61 79 ate: Thu, 03 May 0040 20 32 30 30 31 20 31 35 3A 35 30 3A 35 33 20 47 2001 15:50:53 G 0050 4D 54 0D 0A 0D 0A 25 50 44 46 2D 31 2E 33 0D 25 MT....%PDF-1.3.% 0060 E2 E3 CF D3 0D 0A 31 20 30 20 6F 62 6A 0D 3C 3C ......1 0 obj.<< 0070 20 0D 2F 43 72 65 61 74 6F 72 20 3C 66 65 66 66 ./Creator How-To-Repeat: Apache is configured as a proxy/cache with a CacheMaxExpire directive valued to zero (that's not necessary, but that comes to be useful to repeat systematically the problem). With a navigator which is configured to use the proxy/cache, load a PDF document (or any other document which needs a plug-in or an assistant). The navigator displays correctly the document. Now clear the cache disk, exit and reload the navigator, then load the same PDF document. It will be sent from the proxy-cache without mentioning the content-type in the http headers. The navigator interprets the document as a text/html format and displays the source. >Fix: >Release-Note: >Audit-Trail: From: Rachid Hafid To: submit@bugz.apache.org, apache-bugdb@apache.org Cc: Subject: Re: mod_proxy/7669: No content-type is sent in http headers by the Apacheproxy when the CacheMaxExpire value expires. Date: Tue, 12 Jun 2001 17:12:09 +0100 This is a multi-part message in MIME format. ------------7NhE3WuB9OnU6N9D2A0R5Y7 Content-type: text/plain; charset=us-ascii How to Fix : Replace in proxy-http.c the instruction "c->hdrs = resp_hdrs" (line number 454 ) by if (ap_table_get(resp_hdrs, "hdrs") == NULL) ap_table_set(resp_hdrs, "hdrs", c->hdrs); ------------7NhE3WuB9OnU6N9D2A0R5Y7 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ce message contient des informations confidentielles ou appartenant au Cr=e9dit Lyonnais et est =e9tabli =e0 l'intention exclusive de ses destinataires. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message, ou des informations qu'il contient, doit =eatre pr=e9alablement autoris=e9e. Tout message =e9lectronique est susceptible d'alt=e9ration et son int=e9grit=e9 ne peut =eatre assur=e9e. Le Cr=e9dit Lyonnais d=e9cline toute responsabilit=e9 au titre de ce message s'il a =e9t=e9 modifi=e9 ou falsifi=e9. Si vous n'=eates pas destinataire de ce message, merci de le d=e9truire imm=e9diatement et d'avertir l'exp=e9diteur de l'erreur de distribution et de la destruction du message. This e-mail contains confidential information or information belonging to Cr=e9dit Lyonnais and is intended solely for the addressees. The unauthorised disclosure, use, dissemination or copying (either whole or partial) of this e-mail, or any information it contains, is prohibited. E-mails are susceptible to alteration and their integrity cannot be guaranteed. Cr=e9dit Lyonnais shall not be liable for this e-mail if modified or falsified. If you are not the intended recipient of this e-mail, please delete it immediately from your system and notify the sender of the wrong delivery and the mail deletion. ------------7NhE3WuB9OnU6N9D2A0R5Y7-- >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]