Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1506

Including "; charset=..." in the content type header prevents form fields from getting transmitted?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 4.3.2
    • None
    • None

    Description

      Running the following code works

      Request req = Request.Post(getAidaServiceUrl().toString());
      req.addHeader("Content-Type","application/x-www-form-urlencoded");
      req.bodyForm(Form.form().add("text", text).build());

      but the text will be transferred in iso-8859-1. However changing the second line to
      eq.addHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
      completely prevents the text to get transferred to the server.

      There should be a way to easily send UTF-8 somehow.

      Attachments

        Activity

          People

            Unassigned Unassigned
            johsmi93 John Smitany
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: