Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest ui: use default value instead of confusing placeholder #291

Merged
merged 1 commit into from
Jan 26, 2015

Conversation

andybons
Copy link
Contributor

Per #287, confusion could be caused by assuming that the input placeholder value ("0" in this cause) actually represents the value being passed, which isn’t true. Setting a default value to prevent this confusion in the future.

@tbg
Copy link
Member

tbg commented Jan 26, 2015

That's actually not the reason for #287. I entered "0", "+0", "-0" and "00" and they all end up with

[POST] 400 /kv/rest/counter/asd: could not parse int64 for increment: strconv.ParseInt: parsing "": invalid syntax

FWIW, that's Chromium right now, but I think I had FireFox at home, though I'm not sure.

@tbg
Copy link
Member

tbg commented Jan 26, 2015

(I wasn't able to test your commit, so your change still might have fixed it.)

@andybons
Copy link
Contributor Author

You’re running a non-stable Chromium channel?

@tbg
Copy link
Member

tbg commented Jan 26, 2015

No, don't think so.

18:15 $ /usr/bin/chromium --version
Chromium 39.0.2171.71 Built on 8.0, running on Debian 8.0

@andybons
Copy link
Contributor Author

OK. Well let’s merge this as it at least gives a better default and keep the issue open. If you find yourself in that position again, open up the Web Inspector and paste in what data is being sent with the request.

@tbg
Copy link
Member

tbg commented Jan 26, 2015

Yeah, go for it.
Network explorer shows a content-length 0 request. Will test again after your merge.

POST /kv/rest/counter/asd HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 0
Accept: application/json, text/plain, */*
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://localhost:8080/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: JSESSIONID.e3732d2c=1oqyspzpo7p0zbsv2419htjzi; JSESSIONID.176816f4=124gw4lm8dc7917ksxk6lexoqb; JSESSIONID.81daacb6=14s37wyula7b815eh42sltypc; JSESSIONID.4771515a=5lm2uvq8fkotv591zlhowv4b; JSESSIONID.8ab14d03=1bgxgykwqc1vq149f81ia2v1; JSESSIONID.f9172fe5=1haoff248m8davzk5kh2zgcb3; JSESSIONID.315000ac=17s3ztavb5uuq1o49wjwr40ka8; JSESSIONID.e2bfe0eb=xsclz18mdmof1wcgr8emg05fg; screenResolution=1920x1080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants