Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #376 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

HttpClient incorrectly handles URLs with escaped elements (%xx)

Reported by: CyberShadow Assigned to: kris
Priority: critical Milestone: 0.97 RC 1
Component: Tango Version: trunk
Keywords: Cc:

Description

When given an URL like http://example.org/My%20test%20URL%21/ , HttpClient? sends the following request:

GET /My test URL!/ HTTP/1.0

As you can see, it de-escapes the URL but doesn't escape it. The reason for this is: 1) tango.net.Uri doesn't provide a way to either escape (encode) URI components (although Uri.encode is a public static method, the flags enum needed for correct encoding is private), or to get the escaped versions of certain components; 2) HttpClient.open uses Uri.getPath, which returns the path component in unescaped format.

Change History

04/03/07 00:51:04 changed by kris

  • owner changed from sean to kris.
  • component changed from Core Functionality to Tango.
  • milestone set to 0.97 RC 1.

ah ... thx

04/03/07 19:29:12 changed by kris

  • status changed from new to closed.
  • version set to trunk.
  • resolution set to fixed.