Discussion:
[Geoserver-users] Content Length HTTP header
Ben Jerrim
2017-07-03 09:20:04 UTC
Permalink
Hey guys, i've noticed that the content-length HTTP header is not passed in
the tomcat response from geoserver (not using geowebcache). I'm trying to
use it to hack around an issue with a client library to pass a 204 if
there's no content.

I'm assuming that the response is streamed and that tomcat (geoserver?)
never has the entire message in memory so the header is not added. Just want
to confirm that if possible? Would adding geowebcache to the landscape help
this if the tile is read from disk?

We're using GS 2.11 on Tomcat 8.5.6



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Content-Length-HTTP-header-tp5326459.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime
2017-07-03 18:22:46 UTC
Permalink
Post by Ben Jerrim
Hey guys, i've noticed that the content-length HTTP header is not passed in
the tomcat response from geoserver (not using geowebcache). I'm trying to
use it to hack around an issue with a client library to pass a 204 if
there's no content.
I'm assuming that the response is streamed and that tomcat (geoserver?)
never has the entire message in memory so the header is not added. Just want
to confirm that if possible?
Yes, all outputs are built on the fly and written directly to the output
stream, so
there is no (simple, general) way to know size in advance
Post by Ben Jerrim
Would adding geowebcache to the landscape help
this if the tile is read from disk?
Indeed it shoould, here are the headers from a GWC tile response:

http://demo.geo-solutions.it/geoserver/gwc/service/wms?LAYERS=topp%3Astates&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-101.25,33.75,-90,45&WIDTH=256&HEIGHT=256

HTTP/1.1 200 OK Date: Mon, 03 Jul 2017 18:22:04 GMT
Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Origin,
X-Requested-With, Content-Type, Accept, Host Set-Cookie:
GS_FLOW_CONTROL="GS_CFLOW_65bfefe4:15d0898c703:-6bca"; Version=1
X-Control-flow-delay-ms: 0 geowebcache-tile-index: [7, 11, 4]
Cache-Control: max-age=3600, must-revalidate Expires: Mon, 03 Jul 2017
19:22:04 GMT geowebcache-cache-result: HIT geowebcache-tile-index: [7, 11,
4] geowebcache-tile-bounds: -101.25,33.75,-90.0,45.0 geowebcache-gridset:
EPSG:4326 geowebcache-crs: EPSG:4326 Last-Modified: Wed, 28 Jun 2017
16:13:26 GMT Content-Disposition: inline; filename=geoserver-dispatch.image
Content-Type: image/png *Content-Length: 14121* Keep-Alive: timeout=5,
max=100 Connection: Keep-Alive

Hope this helps
--
Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo Ú consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
Continue reading on narkive:
Loading...