Homec4science

Add missing parameter to strncasecmp()

Authored by epriestley <git@epriestley.com> on May 13 2013, 19:06.

Description

Add missing parameter to strncasecmp()

Summary:
strncasecmp() takes 3 parameters, not 2. This worked in the general case because we usually do not set any headers, so we don't enter this comparison block. However, now that we set User-Agent from OAuth it is complaining in the logs.

[13-May-2013 16:51:28] WARNING: [pool www] child 28977 said into stderr: "NOTICE: PHP message: [2013-05-13 16:51:28] ERROR 2: strncasecmp() expects exactly 3 parameters, 2 given at [/core/libphutil/src/future/http/HTTPSFuture.php:172]"
[13-May-2013 16:51:28] WARNING: [pool www] child 28977 said into stderr: "NOTICE: PHP message:   #0 strncasecmp(User-Agent, Expect) called at [/core/libphutil/src/future/http/HTTPSFuture.php:172]"
[13-May-2013 16:51:28] WARNING: [pool www] child 28977 said into stderr: "NOTICE: PHP message:   #1 HTTPSFuture::isReady() called at [/core/libphutil/src/future/Future.php:40]"
[13-May-2013 16:51:28] WARNING: [pool www] child 28977 said into stderr: "NOTICE: PHP message:   #2 Future::resolve() called at [/core/libphutil/src/future/http/BaseHTTPFuture.php:231]"
[13-May-2013 16:51:28] WARNING: [pool www] child 28977 said into stderr: "NOTICE: PHP message:   #3 BaseHTTPFuture::resolvex() called at [/core/phabricator/src/applications/auth/controller/PhabricatorOAuthLoginController.php:55]"
[13-May-2013 16:51:28] WARNING: [pool www] child 28977 said into stderr: "NOTICE: PHP message:   #4 PhabricatorOAuthLoginController::processRequest() called at [/core/phabricator/webroot/index.php:84]"

Test Plan: Verified strncasecmp() behavior.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D5917

Details

Committed
epriestley <git@epriestley.com>May 13 2013, 19:06
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU1bff117642e0: Put a sigil on remarkip-code-block in PhutilRemarkupEngineRemarkupCodeBlockRule
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUcaab863200f1: Add missing parameter to strncasecmp() (authored by epriestley <git@epriestley.com>).May 13 2013, 19:06