Bug 269455 - musicbrainz request fails in the track title contains a '!' character
Summary: musicbrainz request fails in the track title contains a '!' character
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Metadata Editing and Reading (show other bugs)
Version: 2.4.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 2.4.1
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-26 11:33 UTC by andreaswuest
Modified: 2011-03-29 14:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreaswuest 2011-03-26 11:33:03 UTC
Version:           2.4.0 (using KDE 4.5.1) 
OS:                Linux

hi,

the musicbrainz request fails if the track title contains a '!'. i guess this
also happens with other elements of the track and with other characters. 

tested track: 
http://en.wikipedia.org/wiki/Chop_Suey!_%28song%29

on the console i can see the request:
amarok:   [MusicBrainzFinder] Request sent:  "http://musicbrainz.org:80/ws/1/track/?type=xml&limit=10&query=dur:(211000) track:(Chop Suey!) artist:(System of a Down) release:(Toxicity)" 

the request also fails if i paste the url in the browser. 
> Search server could not complete query: Bad request

masking the '!' with a backslash works in with the url in the  browser. so i guess it will also work for amarok in the code. 
working url:
http://musicbrainz.org/ws/1/track/?type=xml&limit=10&query=dur:%28211000%29%20track:%28Chop%20Suey\!%29%20artist:%28System%20of%20a%20Down%29%20release:%28Toxicity%29

cheers,
andy

Reproducible: Always
Comment 1 Sergey Ivanov 2011-03-28 15:35:13 UTC
Git commit 402623fcd2d29c2d7c1b05ad9cbf69ba079b652d by Sergey Ivanov.
Committed on 28/03/2011 at 15:37.
Pushed by ivanov into branch 'master'.

Screen escape characters in MusicBrainz request string.
BUG: 269455

M  +1    -0    ChangeLog     
M  +7    -3    src/musicbrainz/MusicBrainzFinder.cpp     

http://commits.kde.org/amarok/402623fcd2d29c2d7c1b05ad9cbf69ba079b652d