Re: problem with headers

2007-01-15 Thread Mark Lundquist


On Jan 15, 2007, at 4:39 AM, Joose Vettenranta wrote:


[...] So it might indicate problem with caching and mime-types.


hmmm

https://issues.apache.org/jira/browse/COCOON-1624

???
—ml—


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with headers

2007-01-15 Thread Joose Vettenranta

Mark Lundquist kirjoitti 13.1.2007 kello 23.31:

I have like this in sitemap:

  
   

 

It works for some but not for every file I have.

For the ones it does not work, result is like  this: http:// 
joose.iki.fi/error.jpeg


That's really weird.  Some thoughts:
1) You say you think it has to do with mime type.  Why?


Because matcher with static mime-type works ok, but when I change  
mime-type per request -> no luck.




2) There's nothing in ResourceReader.java that explains why you  
would get this bogus Content-Length header inserted into the  
payload of the HTTP response;


Well, I said this is odd =)

3) If this were broken, lots of people would have this problem,  
because ResourceReader is used all the time to serve plain old  
static content;


It works when I don't dynamicly change mime-type with every request.

5) You say your pipeline works "for some images and not for  
others" (or something along those lines).  I'll bet the same ones  
are always broken, right?


Yep

I'll bet you have some image files that are just crapped up from  
the start, I mean just the plain files right there on the disk!   
I'll bet they are corrupted, and the reader is working just fine.


Hmm.. Nope. I have for images like this on filesystem:

 = original image
.thumb = thumbnail
.biggerthumb = thumbnail
.info = information about image

for thumbnails I have static mime-type: image/jpeg - works ok

for original images I have dynamic mime-type..

thumbnails always works. Also original files are correct and not  
corrupted. I have also tried to copy thumbnail to original image ==  
no work. What makes me think it's about mime-types is that when  
Firefox tries to show image/something it always says image is type  
"image/jpeg".


I made now it so that it (matcher) is in noncaching pipeline and it  
seems to work when I set content-disposition header with action. So  
it might indicate problem with caching and mime-types.


- Joose







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with headers

2007-01-13 Thread Mark Lundquist


On Jan 12, 2007, at 1:43 AM, Joose Vettenranta wrote:


Hello,

I have like this in sitemap:

  
   src="{flow-attribute:path}/{flow-attribute:file}" 
mime-type="{flow-attribute:mimetype}" />

 

It works for some but not for every file I have.

For the ones it does not work, result is like  this: 
http://joose.iki.fi/error.jpeg


That's really weird.  Some thoughts:

1) You say you think it has to do with mime type.  Why?

2) There's nothing in ResourceReader.java that explains why you would 
get this bogus Content-Length header inserted into the payload of the 
HTTP response;


3) If this were broken, lots of people would have this problem, because 
ResourceReader is used all the time to serve plain old static content;


4) The Content-Length value in the header is greater than the value of 
the bogus Content-Length header line in the content, by exactly the 
number of characters in that bogus line;


5) You say your pipeline works "for some images and not for others" (or 
something along those lines).  I'll bet the same ones are always 
broken, right?


I'll bet you have some image files that are just crapped up from the 
start, I mean just the plain files right there on the disk!  I'll bet 
they are corrupted, and the reader is working just fine.


???
—ml—


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with headers

2007-01-13 Thread Joose Vettenranta

Hi,

Ard Schrijvers kirjoitti 12.1.2007 kello 14.24:


I have like this in sitemap:

   

  
Print your mimetype var in flow and look wether it is correct there  
for every file


Yes, mime-type is ok. Even though if mime-type would be something  
very very wrong, then it still should work ok, not add extra stuff in  
the beginning of file.


I think the problem is with Reader and it's way to handle mime-type.

- Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problem with headers

2007-01-12 Thread Ard Schrijvers

> 
> Hello,
> 
> I have like this in sitemap:
> 
>
> 
>   

Print your mimetype var in flow and look wether it is correct there for every 
file

Regards Ard

> 
> It works for some but not for every file I have.
> 
> For the ones it does not work, result is like  this: http:// 
> joose.iki.fi/error.jpeg
> 
> Using cocoon 2.1.7, jetty, apache as proxy in front of cocoon and  
> java j2sdk1.4.2_10
> 
> Anyideas how to fix this or what the problem might be?
> 
> - Joose
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem with headers

2007-01-12 Thread Joose Vettenranta

Hello,

I have like this in sitemap:

  
   

 

It works for some but not for every file I have.

For the ones it does not work, result is like  this: http:// 
joose.iki.fi/error.jpeg


Using cocoon 2.1.7, jetty, apache as proxy in front of cocoon and  
java j2sdk1.4.2_10


Anyideas how to fix this or what the problem might be?

- Joose


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]