# Weird error in gzip compression lesson

**URL:** <https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505>\
**Category:** Challenges\
**Tags:** challenge:http-server\
**Created:** [April 9, 2025, 6:28pm UTC](https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505 "2025-04-09T18:28:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaacfink](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/isaacfink/32/8909_2.png) [@isaacfink](https://forum.codecrafters.io/u/isaacfink)\
**Post date:** [April 9, 2025, 6:28pm UTC](https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505/1 "2025-04-09T18:28:43Z")

</div>

I’m stuck on Stage #QV8.

I reorganized my files and all of a sudden this doesn’t work anymore, not sure why, I am getting this error

```auto
remote: [tester::#QV8] Running tests for Stage #QV8 (Read request body)
remote: [tester::#QV8] $ ./your_program.sh --directory /tmp/data/codecrafters.io/http-server-tester/
remote: [tester::#QV8] $ curl -v -X POST http://localhost:4221/files/orange_pineapple_mango_mango -H "Content-Length: 69" -H "Content-Type: application/octet-stream" -d 'banana blueberry pineapple strawberry apple raspberry raspberry apple'
remote: [your_program]
remote: [your_program] thread '<unnamed>' panicked at src/routes.rs:87:58:
remote: [your_program] called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
remote: [your_program] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
remote: [tester::#QV8] Failed to read response:
remote: [tester::#QV8] Received: "" (no content received)
remote: [tester::#QV8] ^ error
remote: [tester::#QV8] Error: Expected: HTTP-version, Received: ""
remote: [tester::#QV8] Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

```

I don’t remember needing a version header in the previous challenge

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [April 9, 2025, 7:09pm UTC](https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505/3 "2025-04-09T19:09:09Z")

</div>

@isaacfink, could you [upload your code to GitHub](https://docs.codecrafters.io/features/publish-to-github) and share the link? It will be much easier to debug if I can run it directly.

---

<div class="post-metadata">

**Author:** ![isaacfink](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/isaacfink/32/8909_2.png) [@isaacfink](https://forum.codecrafters.io/u/isaacfink)\
**Post date:** [April 9, 2025, 8:00pm UTC](https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505/4 "2025-04-09T20:00:00Z")

</div>

Sure here you go

> **[GitHub - isaacfink/codecrafters-http-server-rust](https://github.com/isaacfink/codecrafters-http-server-rust)**
>
> Contribute to isaacfink/codecrafters-http-server-rust development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [April 11, 2025, 8:18pm UTC](https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505/6 "2025-04-11T20:18:42Z")

</div>

@isaacfink I ran your code and logged the values of **base\_directory** and **file\_path** before and after this line:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/d/da469ee29809909e1e36b7a5d42314260fcb92df.png)

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/1/199459770d2e96fac5e2de66bb1c17ef3a265f10.jpeg)

It looks like **file\_path** is already resolved by that point, so no need to concatenate it with **base\_directory** again.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [April 20, 2025, 9:01am UTC](https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505/8 "2025-04-20T09:01:30Z")

</div>

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [April 25, 2025, 9:02am UTC](https://forum.codecrafters.io/t/weird-error-in-gzip-compression-lesson/8505/9 "2025-04-25T09:02:24Z")

</div>

Closed on April 25, 2025, 9:02am UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
