[PEPr] Comment on Authentication::NTLMProxy

From: Date: Tue, 27 Jun 2006 04:11:51 +0000
Subject: [PEPr] Comment on Authentication::NTLMProxy
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-43131@lists.php.net to get a copy of this message
Justin Patrin (http://pear.php.net/user/justinpatrin) has commented on the proposal for Authentication::NTLMProxy. Comment: sprintf is far slower than any other string creation method. Single quotes are the preferred method. See: http://pear.reversefold.com/strings/ It is especially inappropriate to use sprintf when you're not even doing anything to the string (such as sprintf("\r\n\r\n")...). This package should use HTTP_Request and/or HTTP_Client. If there is a problem with keep-alive I doubt it would be too hard to alter HTTP_Client and Request to support it. They could easily just keep the socket open and do more sending/receiving. I don't really like the names of the "state" functions. I would rather they were named for what they do such as connect, sendRequest, readRequest, parseRequest, etc. die()/exit should not be called in a package. Why can't the script simply exit normally? _createNewSocket and _createSocket duplicate code. Don't use @ to silence notices and warnings. Write your code to avoid them instead. Errors should raise/return a PEAR_Error. The log is a decent I idea, but I suggest you use the Log package instead as it would allow the developer to log however they want to. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=396 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#43131) next »