<div dir="ltr">Grasping at straws a little bit here, but can you (a) do a packet capture (e.g. `tcpdump -X`) to see what's going back and forth on the wire, just to make absolutely sure all of the oddness is on the client's end?<div><br></div><div>A string like `!D(MISSING)` sorta looks like a decoding error so perhaps it will be instructive to look at the bytes on the wire it's trying to decode, although I can't think what could be confused with an equals sign. It's not like that blooming Greek question mark (<a href="http://www.fileformat.info/info/unicode/char/037e/index.htm">http://www.fileformat.info/info/unicode/char/037e/index.htm</a>).<br><div><br></div><div>Cheers,</div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 January 2017 at 18:47, Nigel Rantor <span dir="ltr"><<a href="mailto:wiggly@wiggly.org" target="_blank">wiggly@wiggly.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 14/01/17 17:37, Jan von Löwenstein wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Oh, it happens with servant on the client side.<br>
<br>
I use a swagger-codegen generated servant based client to access kubernetes.<br>
Calling <a href="https://github.com/soundcloud/haskell-kubernetes/blob/master/lib/Kubernetes/Api/ApivApi.hs#L475" rel="noreferrer" target="_blank">https://github.com/soundcloud/<wbr>haskell-kubernetes/blob/master<wbr>/lib/Kubernetes/Api/ApivApi.<wbr>hs#L475</a> works<br>
Calling <a href="https://github.com/soundcloud/haskell-kubernetes/blob/master/lib/Kubernetes/Api/ApivApi.hs#L473" rel="noreferrer" target="_blank">https://github.com/soundcloud/<wbr>haskell-kubernetes/blob/master<wbr>/lib/Kubernetes/Api/ApivApi.<wbr>hs#L473</a> doesn't.<br>
<br>
>From what I see the `QueryParam"labelSelector" Text`is the same in both.<br>
<br>
Logging the value gives the literal `=` as expected. Logging the<br>
(http-client) requests shows the difference.<br>
</blockquote>
<br></span>
So I went ahead and wrote a simple client by hand and when I call the two functions on a local endpoint that shows me the request URL I get the following.<br>
<br>
Same arguments for 'pretty' and 'labelSelector' in both cases.<br>
<br>
Code:<br>
<br>
runListSecret :: Manager -> BaseUrl -> ClientM SecretList <br>
<br>
runListSecret manager baseUrl = listSecret (Just "prettyArg") (Just "=") Nothing Nothing Nothing Nothing manager baseUrl <br>
<br>
<br>
<br>
runListService :: Manager -> BaseUrl -> ClientM ServiceList <br>
<br>
runListService manager baseUrl = listService (Just "prettyArg") (Just "=") Nothing Nothing Nothing Nothing manager baseUrl<br>
<br>
Server log:<br>
<br>
127.0.0.1 - - [14/Jan/2017:18:39:49 +0000] "GET /api/v1/secrets?pretty=prettyA<wbr>rg&labelSelector=%3D HTTP/1.1" 404 - 0.0003<br>
127.0.0.1 - - [14/Jan/2017:18:39:49 +0000] "GET /api/v1/services?pretty=pretty<wbr>Arg&labelSelector=%3D HTTP/1.1" 404 - 0.0003<br>
<br>
I haven't used swagger-codegen but the servant-client code works for me so I would look more into that.<br>
<br>
Swagger codegen looks like it might take me a while to get my head into so maybe you could look at the generated code, or sling it to me here or directly.<br>
<br>
The two calls are so similar that I can't see why the generated client would behave differently in those cases.<br>
<br>
Regards,<br>
<br>
  n<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Best<br>
Jan<br>
<br>
Nigel Rantor <<a href="mailto:wiggly@wiggly.org" target="_blank">wiggly@wiggly.org</a> <mailto:<a href="mailto:wiggly@wiggly.org" target="_blank">wiggly@wiggly.org</a>>> schrieb am<div><div class="h5"><br>
Sa., 14. Jan. 2017 um 18:11 Uhr:<br>
<br>
    On 13/01/17 19:28, Jan von Löwenstein wrote:<br>
    > Hi,<br>
    ><br>
    > I have got a two places with a `QueryParam "q" Text` and call it<br>
    with a<br>
    > Text that contains a `=` literal. In one place the `=` is correctly<br>
    > encoded as %3D, in the other I see a `!D(MISSING)`.<br>
    ><br>
    > This has to happen somewhere in Servant or the lower layers. Both<br>
    Texts<br>
    > print out nicely with an `=` sign if I just print them to stdout.<br>
    ><br>
    > Google does not find `!D(MISSING)` anywhere.<br>
    ><br>
    > Any idea what could possibly be the problem here?<br>
<br>
    It would be really useful to see exactly how you are 'calling' this.<br>
<br>
    Do you have a curl command line or are you using some other client?<br>
<br>
       n<br>
<br>
    ______________________________<wbr>_________________<br>
    Haskell-Cafe mailing list<br>
    To (un)subscribe, modify options or view archives go to:<br>
    <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
    Only members subscribed via the mailman list are allowed to post.<br>
<br>
</div></div></blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.</div></div></blockquote></div><br></div>