Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/MapPrintServiceImpl.java @ 6978:3bff11208d3d
Fix for Browser and server running both on localhost. Previously all requests from localhost where accepted w/o auth. Now they are only accepted when a HTTP header X_NO_GGINA_AUTH=TRUE is send, too. This is ddone when printing maps.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 09 Sep 2013 18:22:47 +0200 |
parents | fe496c477173 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
6977:e1010a0f0b05 | 6978:3bff11208d3d |
---|---|
425 | 425 |
426 // FIXME: The request is not authenticated. | 426 // FIXME: The request is not authenticated. |
427 // Currently this is not a problem because /flys/map-print | 427 // Currently this is not a problem because /flys/map-print |
428 // is whitelisted in GGInAFilter. | 428 // is whitelisted in GGInAFilter. |
429 GetMethod get = new GetMethod(url); | 429 GetMethod get = new GetMethod(url); |
430 get.addRequestHeader("X_NO_GGINA_AUTH", "TRUE"); | |
430 int result = client.executeMethod(get); | 431 int result = client.executeMethod(get); |
431 InputStream in = get.getResponseBodyAsStream(); | 432 InputStream in = get.getResponseBodyAsStream(); |
432 | 433 |
433 if (in != null) { | 434 if (in != null) { |
434 try { | 435 try { |