   }
 
   mutating func inSpace() throws {
-    var i = index
-    var c = stream[i]
-    let len = length
-    while c == 32 {
-      i += 1
-      if i >= len {
-        index = i
-        return
-      }
-      c = stream[i]
-    }
-    index = i
+    while index < length && stream[index] == 32 {
+      index += 1
+    }
     entryParser = linedUpParser
   }
 

    repeat {
      let c = stream[i]
      if boundTest3 && c == 13 {
        body.fields[nameValue] = collectString(i - boundary.count - 5)
        index = length // Body exit.
        done = true
        break

      boundTest2 = false
      if boundTest1 {
        if c == 13 {
          let ei = i - boundary.count - 3
          if !fileNameValue.isEmpty || !contentTypeValue.isEmpty {
            body.files[nameValue] = BodyFile(name: fileNameValue,
                contentType: contentTypeValue, data: collectToken(ei))
          } else {
            body.fields[nameValue] = collectString(ei)
          }
          entryParser = .LineFeed
          linedUpParser = .ContentDisposition
          index = i + 1
