GeoServer
  1. GeoServer
  2. GEOS-335

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

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-beta3
    • Fix Version/s: 1.3-rc2
    • Component/s: Global
    • Labels:
      None
    • Number of attachments :
      0

      Description

      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

        Activity

        Hide
        dblasby added a comment -

        patch applied

        Show
        dblasby added a comment - patch applied
        Hide
        Andrea Aime added a comment -

        These issue has been in resolved state for at least one month (quite a bit, a lot more than one month). Batch transitioning them to closed state

        Show
        Andrea Aime added a comment - These issue has been in resolved state for at least one month (quite a bit, a lot more than one month). Batch transitioning them to closed state

          People

          • Assignee:
            Chris Holmes
            Reporter:
            Paolo Rizzi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: