Chromium Code Reviews| Index: net/spdy/spdy_framer.cc |
| diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc |
| index a02cb2e30ece9b31838a60eced37929a2a33592d..d8023491882df2d5150b347ea163cd2b8b9083f5 100644 |
| --- a/net/spdy/spdy_framer.cc |
| +++ b/net/spdy/spdy_framer.cc |
| @@ -1339,15 +1339,11 @@ void SpdyFramer::WriteHeaderBlockToZ(const SpdyHeaderBlock* headers, |
| // is currently last (and so doesn't have a trailing semicolon) won't |
| // match if it's later in a non-final position. The same is true of |
| // the first cookie. |
| - if (i == 0 && cookie_values.size() == 1) { |
| - cookie = cookie_values[i].as_string(); |
| - } else if (i == 0) { |
| - cookie = cookie_values[i].as_string() + ";"; |
| - } else if (i < cookie_values.size() - 1) { |
| - cookie = " " + cookie_values[i].as_string() + ";"; |
| - } else { |
| - cookie = " " + cookie_values[i].as_string(); |
| - } |
| + if (i > 0) |
| + cookie.append(" "); |
| + cookie.append(cookie_values[i].as_string()); |
| + if (i < cookie_values.size() - 1) |
| + cookie.append(";"); |
|
mmenke
2015/03/09 20:21:58
Isn't this the same as:
if (i > 0)
cookie.appen
|
| WriteZ(cookie, kZCookieData, z); |
| } |
| } else if (it->first == "accept" || |