Re: Help with 400 Bad Request
Joe Martinez <[email protected]> Sun, 15 Feb 2015 03:30:40 -0800
| Newsgroups | gmane.comp.audio.musicbrainz.devel |
|---|---|
| Message-ID | <CAD0McPrwH1Ri4BWvnFp4+jQwX2cJHtX29u_bPS6fY30eDafn-w@mail.gmail.com> |
Yes!!!!!! I finally got an "OK" response! The final problem was that I had changed the qop value in the qop field itself in the Digest, but I didn't change it in the MD5 hash computation, so they didn't match. I changed it there, and it worked! I then changed to the production server with my real username and password, and got an "OK" response. I checked the website, and my rating is now showing there! Thank you! Thank you! Thank you!!!! I never could have figured this out without your help! All this was due to a stupid bug in .NET, and also some bugs in the posted workaround. I'm so happy! Once I get this all smoothed out, I'll be sure and submit my client provider for the MusicBrainz website so others can use it. Thanks again! -Joe On Sun, Feb 15, 2015 at 3:10 AM, Ulrich Klauer <[email protected]> wrote: > Joe Martinez wrote: > > > Ok, I changed the user to "foo", and changed the qop value to just > "auth". > > I still get the same error. I tried on the real server with my real > > username and password, and got the same error as well. > > There may be an error in the digest auth (re)implementation. Here's > one of the headers: > > Authorization: Digest username="foo", realm="musicbrainz.org", > nonce="0SrG013lQXGx4D+kSt+MKA==", > uri="/ws/2/rating?client=StarMyGrooves-1.0", algorithm=MD5, > response="5bad0672d2471db82fcbe2458dadd97d", qop="auth", > nc="00000001", cnonce="4498083", opaque="iya2HDCZRt2MaQ0ItxKNHg==" > > When I calculate what the response should be, I get: > $ echo -n 'foo:musicbrainz.org:mb' | md5sum - > da514dfb6ce7e1c7a7f96c43058afce1 - > $ echo -n 'POST:/ws/2/rating?client=StarMyGrooves-1.0' | md5sum - > ff66f61b71a315cccce4812e96a65e84 - > $ echo -n > 'da514dfb6ce7e1c7a7f96c43058afce1:0SrG013lQXGx4D+kSt+MKA==:00000001:4498083:auth:ff66f61b71a315cccce4812e96a65e84' > | md5sum > - > 9076ea78ed724151ad0f5ec046f4a348 - > > However, the response is 5bad067..., not 9076ea7... > > Ulrich > > > _______________________________________________ > MusicBrainz-devel mailing list > [email protected] > http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel > _______________________________________________ MusicBrainz-devel mailing list [email protected] http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel