Skip to content

WAUrl parsing and serialization needs to be context dependent #790

@GoogleCodeExporter

Description

@GoogleCodeExporter
There are several issues with WAUrl how the handling of spaces and + is not 
spec compliant [1]. We should pass the following tests

"serialization"
    url := WAUrl new.
    url host: 'example.com'.
    url addToPath: 'blue+light blue'.
    url queryFields at: 'blue+light blue' put: nil.
    self assert: url greaseString =
'http://example.com/blue+light%20blue?blue%2Blight+blue'

"parsing"
    url := (WAUrl absolute:
'http://example.com/blue+light%20blue?blue%2Blight+blue')
        decodedWith: GRNullCodec new.
    self assert: url path first = 'blue+light blue'.
    self assert: (url queryFields includesKey: 'blue+light blue').

    url := (WAUrl absolute: 'http://example.com/blue%2Fred%3Fand+green')
        decodedWith: GRNullCodec new.
    self assert: url path first = 'blue/red?and+green'

 [1] http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding

Original issue reported on code.google.com by philippe...@gmail.com on 22 Apr 2014 at 6:33

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions