Re: Browser handling a URL having .123. in the breadcrumb trail as a Lotus file
Re: Browser handling a URL having .123. in the breadcrumb trail as a Lotus file
- Subject: Re: Browser handling a URL having .123. in the breadcrumb trail as a Lotus file
- From: Patrick Middleton <email@hidden>
- Date: Thu, 18 Mar 2010 17:03:07 +0000
I think I have it.
I modified this function in mod_WebObjects.c , adding the call to
WOLog() and subsequently commenting out one term in the if-statement.
=-=-=-=-=-=
static void gethdr(const char *key, const char *value, void *req) {
request_rec *r = (request_rec *)req;
WOLog(WO_DBG, "%s:%d %s r->unparsed_uri:%s key:%s value:%s r-
>content_type:%s",
__FILE__, __LINE__, __PRETTY_FUNCTION__,
(r->unparsed_uri ? r->unparsed_uri : "<null>"),
(key ? key : "<null>"),
(value ? value : "<null>"),
(r->content_type ? r->content_type : "<null>"));
if ( /* (r->content_type == NULL) && */ (strcasecmp
(CONTENT_TYPE,key) == 0)) {
r->content_type = (char *)ap_pstrdup(r->pool, value);
} else {
ap_table_add(r->headers_out, key, value);
}
}
=-=-=-=-=-=
Once I enabled logging, I got the output below. My application was
attempting to set a content-type header, and the adaptor had special-
case code for that header, but the code wasn't being called as
something else, presumably mod_mime, had already set a value for that
header.
=-=-=-=-=-=
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:date value:Thu, 18 Mar 2010 16:35:05
GMT r->content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:expires value:Thu, 18 Mar 2010
16:35:05 GMT r->content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:pragma value:no-cache r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:content-type value:text/html r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:cache-control value:private r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:cache-control value:no-cache r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:cache-control value:no-store r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:cache-control value:must-revalidate r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:cache-control value:max-age=0 r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:connection value:close r-
>content_type:application/vnd.lotus-1-2-3
Debug: mod_WebObjects.c:437 gethdr r->unparsed_uri:/cgi-bin/
WebObjects/MyApp.woa/64/wo/y3mg8PShGpKS3OCKmH49s4fCrTK/
7.0.1.8.1.3.23.3.3.123.1.1 key:content-length value:34327 r-
>content_type:application/vnd.lotus-1-2-3
=-=-=-=-=-=
On 18 Mar 2010, at 12:42, Patrick Middleton wrote:
Reorderering module loading did not help.
...
I also note in the Apache 1.3 .../manual/misc/API.html,
Note that the Content-type header value cannot be set by module
content-handlers using the ap_table_*() routines. Rather, it is
set by pointing the content_type field in the request_rec
structure to an appropriate string. E.g.,
r->content_type = "text/html";
On 17 Mar 2010, at 17:50, Chuck Hill wrote:
Hi Patrick,
...
I'm guessing this counts as a bug in mod_WebObjects.so; if it's
picking up a content type value from the instance response, it
should be handling it in a way that it doesn't then get
overridden by mod_mime.
My guess would be a bug in mod_mime that is doing the equivalent
of url.contains(".123") rather than url.endsWith(".123"). Can you
re-arrange the order the modules are loaded and added? If you
move mod_mime _after_ mod_webobjects, that might avoid the issue.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
---
Regards Patrick
OneStep Solutions (Research) LLP
www.onestep.co.uk
This email, including any attachments, is confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient you must not disseminate, distribute or copy any part of this email nor take any action in reliance on it.
If you have received this in error please notify the sender immediately by email or phone +44 (0)1702 426400 and delete this email and any attachments from your system.
Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required please request a hard-copy version.
OneStep Soutions LLP is registered in England and Wales under registration number OC337173 and has its registered office at 457 Southchurch Road, Southend-on-Sea, Essex SS1 2PH.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden