r#"first multipart component must be name="m""#
)) }
- eprintln!("boundary={:?} initial={:?} start={} comp={:?}",
- boundary, initial, start, &comp);
+ let nl = memchr::memchr2(b'\r', b'\n', comp.payload_start)
+ .ok_or_else(|| anyhow!("no newline in first metadata line?"))?;
+
+ let client = &comp.payload_start[0..nl];
+ let client = str::from_utf8(client).context("client addr utf-8")?;
+ let client: IpAddr = client.parse().context("client address")?;
+
+ eprintln!("boundary={:?} start={} name={:?} client={}",
+ boundary, start, &comp.name, client);
Ok::<_,AE>(())
}.await {