You are not logged in.

1

Thursday, June 2nd 2005, 10:01pm

Konqueror wants to use KWrite for JSP pages.

Basically when I try to access a page that has .jsp as the end of the URL, konqueror wants to open KWrite and just dump the stream from the webserver into it, rather than render the page itself.

I've tried setting the mime type and associating the extension for .jsp to go to konqueror, but that has had no effect.

If I use firefox, the pages are rendered correctly.

Has anyone else seen/fixed this?

(Searching KDE bugs didn't turn up anything.)

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Friday, June 3rd 2005, 11:45am

Maybe the webserver is sending a wrong MIME type.
It should send text/html or whatever the jsp creates.

Try requesting it with wget and check the output for header field Content-Type

#> wget -S http://..../file.jsp

Cheers,
_
Qt/KDE Developer
Debian User

3

Monday, June 6th 2005, 4:57pm

I did that on a link and the output showed that it is not sending a MIME type.

Here's one of the links I'm having trouble with: https://carenet.fnfismd.com/indymacbank/ACCLogin.jsp

Wget reports that this link is a Sun One webserver sending HTTP/1.1 and setting a session cookie.

guandalug

Beginner

Posts: 3

Location: Witten, Germany

  • Send private message

4

Tuesday, June 7th 2005, 11:14pm

Hmm, the page you liked is kinda...... stupid. It really doesn't send a Mime type, so Konqueror is forced to guess. And as they are stupid enough to send a couple of empty lines (including lines with a few spaces), Konqueror guesses that it's a text file of some sort and handles it as such.

If you ask me, this is a BIG design error..... from the author of the website.

5

Wednesday, June 8th 2005, 3:43pm

But shouldn't Konqueror be ignoring the leading white space? That appears to be the behavior of Firefox.

guandalug

Beginner

Posts: 3

Location: Witten, Germany

  • Send private message

6

Wednesday, June 8th 2005, 5:12pm

Depends. For file type detection, it's the first few bytes of a file (see 'man file' and check for 'magic number tests'). In this case, it's newlines and spaces.

It would not make sense for Konqueror to do own 'file detection' stuff when a library like the file type detection library (which I assume is used - I'm not a KDE coder) is available.

Therefore, while it would make sense in THIS case to strip off the blank lines, generally this poses no problem, if the server side is configured properly and sends a correct mimetype OR a valid page....

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

7

Wednesday, June 8th 2005, 6:50pm

Quoted

Originally posted by allan
I did that on a link and the output showed that it is not sending a MIME type.

Here's one of the links I'm having trouble with: https://carenet.fnfismd.com/indymacbank/ACCLogin.jsp

Works fine here
Konqueror 3.3.2

In any case the jsp is broken, as it should write proper content type headers in its reponse.

Cheers,
_
Qt/KDE Developer
Debian User

8

Friday, June 10th 2005, 8:49pm

Quoted

Originally posted by anda_skoa
Works fine here
Konqueror 3.3.2

In any case the jsp is broken, as it should write proper content type headers in its reponse.

Cheers,
_


Ok, I'm using 3.4.1. Perhaps something broke since the 3.3 series. And I say broke, as even though the jsp is not sending proper format, other browsers detect and render the page properly. End users don't care who isn't doing things right, they just want it to work. So sweeping it under the carpet and pointing at the website is not a good way of doing things.

It would be nice if everyone did things strictly, but they don't. So the tools need to be flexable.

An adage that I learned a long time ago when I began my career in software development said: "Be liberal in the input you accept, but conservative on the output you generate."

Basically, you know someone out there isn't going to closely follow the rules, but you need to work with what they give you. At the same time, you should follow the rules yourself as to not make things worse for the next person down the line.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

9

Saturday, June 11th 2005, 1:23pm

Quoted

Originally posted by allan
Ok, I'm using 3.4.1. Perhaps something broke since the 3.3 series.

Could be a regression. Can anybody else with 3.4 test this?
Maybe a change in the MIME type guessing algorithm.

Quoted


An adage that I learned a long time ago when I began my career in software development said: "Be liberal in the input you accept, but conservative on the output you generate."

Actually Konqueror is already flexibile here.
If no content type is specified, it could treat it as binary, i.e. application/octet-stream.
Instead it perfoms a MIME type guess, trying to make the best out of the failure by the sender which obviously doesn't follow the above rule.

At least they don't send wrong content types, some servers explicitly send text/plain :(

Cheers,
_
Qt/KDE Developer
Debian User