After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644048 - soup_date_new_from_string fails with uppercase abbreviations
soup_date_new_from_string fails with uppercase abbreviations
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2011-03-06 22:43 UTC by Christian Dywan
Modified: 2011-03-08 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Parse month names regardless of case (1.16 KB, patch)
2011-03-07 16:20 UTC, Christian Dywan
reviewed Details | Review

Description Christian Dywan 2011-03-06 22:43:53 UTC
A date such as MON, 17 APR 2006 19:53:36 -0400 when given to soup_date_new_from_string is not parsed. It does parse if changing the day to "Mon" and month to "Apr". I presume the parser should be case insensitive.
Comment 1 Christian Dywan 2011-03-07 16:20:18 UTC
Created attachment 182720 [details] [review]
Parse month names regardless of case

The attached patch makes the month parsing caseless and adds a test case.
Comment 2 Dan Winship 2011-03-07 16:36:44 UTC
Comment on attachment 182720 [details] [review]
Parse month names regardless of case

(oops, wrong button)

>+		if (!strncasecmp (*date_string, months[i], 3)) {

you need to use g_ascii_strncasecmp(), or else it won't work right in Turkey. OK to commit with that change.
Comment 3 Christian Dywan 2011-03-08 15:07:04 UTC
Committed with the change. Thanks for the quick review.