New issue
Advanced search Search tips

Issue 671813 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Don't use isdigit in net/

Project Member Reported by mmenke@chromium.org, Dec 6 2016

Issue description

isdigit can return locale-dependent results, which isn't something we should be doing in net.  Instead, we should compare directly to numbers, or use net/parse_number.h.

It looks like there are 5 consumers:

1)  mock_http_cache.cc - test file, doesn't really matter much, unless a developer has issues with it.
2)  FtpNetworkTransaction - should be fixed.
3)  quick_spdy_stream - status line validator, should use parse_number routines, since it also parses the number.
4)  http_status_line_validator - used for histograms.  We should decide if we can be more strict about parsing status lines, and just remove the code.
5)  spdt_alt_svc_wire_format - this is a roll-your-own ASCII number parser.  It should be using parse_number.  It's used base::StringPiece::iterators, though, which is a bit weird.  Unclear if there's a sane way to get a StringPiece out of that (StringPiece::iterators are just pointers to characters in order, but can we depend on that?  Seems icky).
 
Cc: eroman@chromium.org
Status: Fixed (was: Assigned)

Sign in to add a comment