Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: net/tools/flip_server/flip_in_mem_edsm_server.cc

Issue 1566013: Fixes a problem with filename lookups when not using encoding.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/tools/flip_server/flip_in_mem_edsm_server.cc
===================================================================
--- net/tools/flip_server/flip_in_mem_edsm_server.cc (revision 43504)
+++ net/tools/flip_server/flip_in_mem_edsm_server.cc (working copy)
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include <dirent.h>
-#include <linux/tcp.h> // For TCP_NODELAY
+#include <netinet/tcp.h> // For TCP_NODELAY on some distros, this needs to be <linux/tcp.h>
Mike Belshe 2010/04/02 19:41:28 nit: 80 columns.
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
@@ -194,12 +194,18 @@
// Encode the URL.
string EncodeURL(string uri, string host, string method) {
+ string filename;
if (!FLAGS_need_to_encode_url) {
// TODO(mbelshe): if uri is fully qualified, need to strip protocol/host.
- return string(method + "_" + uri);
+ if (uri[0] == '/') {
+ // uri is not fully qualified.
+ filename = method + "_/" + host + uri;
+ } else {
+ filename = method + "_" + uri;
+ }
+ return filename;
}
- string filename;
if (uri[0] == '/') {
// uri is not fully qualified.
filename = net::UrlToFilenameEncoder::Encode(
« net/tools/flip_server/balsa_headers.cc ('K') | « net/tools/flip_server/balsa_headers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698