# No-content received error

**URL:** <https://forum.codecrafters.io/t/no-content-received-error/13171>\
**Category:** Challenges\
**Tags:** challenge:http-server\
**Created:** [July 6, 2025, 5:39pm UTC](https://forum.codecrafters.io/t/no-content-received-error/13171 "2025-07-06T17:39:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravivarmalearner](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/ravivarmalearner/32/10505_2.png) [@ravivarmalearner](https://forum.codecrafters.io/u/ravivarmalearner)\
**Post date:** [July 6, 2025, 5:39pm UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/1 "2025-07-06T17:39:33Z")

</div>

I’m getting **no content received** error despite reading line in concurrent block. Let me know what is going wrong here.

 ![Step-8](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/2/2b0d226303f5f5ac07ccbf97e31ae7f48fee17bd.png)

---

<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:** [July 6, 2025, 6:21pm UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/3 "2025-07-06T18:21:12Z")

</div>

Hey @ravivarmalearner, could you check if you’ve committed and pushed the latest changes?

Looks like `ClientHandler` is currently empty on our server:

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

---

<div class="post-metadata">

**Author:** ![ravivarmalearner](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/ravivarmalearner/32/10505_2.png) [@ravivarmalearner](https://forum.codecrafters.io/u/ravivarmalearner)\
**Post date:** [July 7, 2025, 3:28am UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/4 "2025-07-07T03:28:49Z")

</div>

![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/4/44e8a61b014f80e613368315cfa8b1beaa8cfe0c.png)  
Missed to give git add. Its comitted now. Even now also i’m facing same issue.

---

<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:** [July 7, 2025, 3:31am UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/5 "2025-07-07T03:31:46Z")

</div>

These two files are modified but haven’t been staged for commit yet:

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

To include them in your next commit, run:

```auto
git add .

```

Let me know if it works or not.

---

<div class="post-metadata">

**Author:** ![ravivarmalearner](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/ravivarmalearner/32/10505_2.png) [@ravivarmalearner](https://forum.codecrafters.io/u/ravivarmalearner)\
**Post date:** [July 7, 2025, 3:32am UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/6 "2025-07-07T03:32:59Z")

</div>

Yeah done that. But still facing same issue.

---

<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:** [July 7, 2025, 3:54am UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/7 "2025-07-07T03:54:43Z")

</div>

@ravivarmalearner Looks like the issue is with this line:

```auto
new ClientHandler(serverSocket.accept()).run()

```

This runs the handler **synchronously** on the main thread, which blocks further connections.

To run it **asynchronously** , you should start a new thread:

```auto
new Thread(new ClientHandler(serverSocket.accept())).start();

```

Let me know if you’d like further clarification!

---

<div class="post-metadata">

**Author:** ![ravivarmalearner](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/ravivarmalearner/32/10505_2.png) [@ravivarmalearner](https://forum.codecrafters.io/u/ravivarmalearner)\
**Post date:** [July 7, 2025, 4:05am UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/8 "2025-07-07T04:05:00Z")

</div>

> [@andy1li](#):
>
> `new Thread(new ClientHandler(serverSocket.accept())).start();`

Thank you.. Its working now.

---

<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:** [July 13, 2025, 4:28am UTC](https://forum.codecrafters.io/t/no-content-received-error/13171/9 "2025-07-13T04:28:36Z")

</div>

Closed on July 13, 2025, 4:28am UTC

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