Skip to content


Zend\Http\Client uses arg_separator.output to build URLs, resulting in possibly wrongly formed URLs #2745

demonkoryu opened this Issue · 2 comments

3 participants


I've set arg_separator.output to &.
http_build_query() by default uses this separator in the query strings it builds. This results in HTTP requests like GET /index.php?arg=pie&oh=no.

Most HTTP servers don't understand that and bugger out.

As a workaround, I temporarily set arg_separator.output to & for the duration of Zend\Http\Client->send().

@demonkoryu demonkoryu added a commit to demonkoryu/zf2 that referenced this issue
@demonkoryu demonkoryu Fixes #2745 caf3749
Zend Framework member

Why do you set arg_separator.output to & in the first place?


For generating valid HTML when using transparent session IDs.

I've also might have set arg_separator.output to ;, but there's the same problem: Some web APIs don't understand that because they use the semicolon as pseudo array delimiters in their argument values.

@weierophinney weierophinney pushed a commit that closed this issue
@demonkoryu demonkoryu Fixes #2745. 5821567
@ghost Unknown pushed a commit that referenced this issue
@demonkoryu demonkoryu Fixes #2745. e027038
@ghost Unknown pushed a commit that referenced this issue
@weierophinney weierophinney Merge branch 'feature/2774' into develop
Close #2774
Close #2745
@gianarb gianarb pushed a commit to zendframework/zend-http that referenced this issue
@demonkoryu demonkoryu Fixes zendframework/zf2#2745. baf188d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.