'-W' needs to be *after* URL prefix argument. README says otherwise. #10

Closed
trentm opened this Issue Jan 10, 2011 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

trentm commented Jan 10, 2011

Hello,

At least for me on a Solaris box I've found that this example in the README doesn't work:

. /path/to/resty -W 'https://myhost.com/data*.json'

For the equivalent to work for me, I needed to use the '-W' after the URL prefix argument like so:

. /path/to/resty 'https://myhost.com/data*.json' -W

A concrete example: Here I've added an "echo" statement to show the 'curl' command-line that is being called. Hopefully that gives you enough of a hint:

[root@mybox ~]# . resty/resty -W 'http://10.99.99.8:8080*'
[root@mybox ~]# GET /
curl -sLv  -X GET -b /root/.resty/c/-W -c /root/.resty/c/-W http://-W/
[root@mybox ~]# . resty/resty  'http://10.99.99.8:8080*' -W
[root@mybox ~]# GET /
curl -sLv  -X GET -b /root/.resty/c/10.99.99.8:8080 -c /root/.resty/c/10.99.99.8:8080 http://10.99.99.8:8080/
<errors>
  <error>Not authorized
</error>
</errors>
[root@mybox ~]# 

Where, in my case that "..." XML output is the expected response.

Ideas? It is possible this is a Solaris vs. Linux difference, but I haven't traced through the Bash code path handling '-W'.

Owner

micha commented Jan 10, 2011

Ah. That was a bug. It should work correctly (as in the README) now. Thanks!

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment