Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing Content-Type headers #8

Open
prateepb opened this issue Nov 13, 2014 · 1 comment
Open

Missing Content-Type headers #8

prateepb opened this issue Nov 13, 2014 · 1 comment
Labels

Comments

@prateepb
Copy link
Contributor

Servlets need Content-Type: text/html header please:

[root@centos ~]# curl -v  http://localhost:8080/spiracle/Get_int?id=1
* About to connect() to localhost port 8080 (#0)
*   Trying ::1... connected
* Connected to localhost (::1) port 8080 (#0)
> GET /spiracle/Get_int?id=1 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:8080
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Content-Length: 1601
< Date: Thu, 13 Nov 2014 16:54:50 GMT
< 
@prateepb prateepb added the bug label Nov 13, 2014
@stuken
Copy link
Contributor

stuken commented Nov 13, 2014

This appears to be because we do a lot of manual writing to the response objects output stream and not to a nice presentation layer JSP. Because there is no file system entry for the actual response tomcat doesn't appear to be setting the mime type.
I think I can put together a hack by manually setting the content type header in the SelectUtil.java and UpdateUtil.java but the real fix is a proper MVC pattern for the whole SQL injection side of things. One is quick and hacky the other is a more fundamental change to the way the app presents data and is more in line with how the other servlets go about it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants