[Geoserver-devel] [jira] Created: (GEOS-335) TestWfsPost doesn't support BASIC authentication (CONTAINS A FIX)

TestWfsPost doesn't support BASIC authentication (CONTAINS A FIX)
-----------------------------------------------------------------

         Key: GEOS-335
         URL: http://jira.codehaus.org/browse/GEOS-335
     Project: GeoServer
        Type: Bug
  Components: Global
    Versions: 1.3.0-beta3
    Reporter: Paolo Rizzi
Assigned to: Chris Holmes
    Priority: Minor
     Fix For: 1.3-rc1

The TestWfsPost class doesn't support BASIC authentication,
so if you use it to test a protected server, it doesn't work.

I rudely fixed it, adding these lines:
                  //SISfixed - if there was authentication info in the request,
                  //pass it along the way to the target URL
                String authHeader = request.getHeader("Authorization");
                if( authHeader != null )
                  acon.setRequestProperty("Authorization",authHeader);
                                            
inside the processRequest() method between the lines:
                acon.setDoOutput(true);
                acon.setDoInput(true);
                acon.setUseCaches(false);
and
                //acon.setRequestProperty("Content-Type", "application/xml");
                if (!doGet) {
                    xmlOut = new PrintWriter(new BufferedWriter(

There are surely better ways, but it worked for me.

Bye
Paolo Rizzi

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira