# Getting 'Received: "" (no content received)' in XV6

**URL:** <https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130>\
**Category:** Challenges\
**Tags:** challenge:redis\
**Created:** [February 21, 2025, 2:41pm UTC](https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130 "2025-02-21T14:41:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![moose-715](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/moose-715/32/32_2.png) [@moose-715](https://forum.codecrafters.io/u/moose-715)\
**Post date:** [February 21, 2025, 2:41pm UTC](https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130/1 "2025-02-21T14:41:53Z")

</div>

Hey folks,

I am getting ‘Received: “” (no content received)’ when master sends `GETACK` for the first time after the handshake: `master: > REPLCONF GETACK *`.

I think the problem is the master is sending the command too fast and when the replica is not yet ready to handle the connection.

Here is my code where the handshake starts: [codecrafters-redis-rust/src/main.rs at master · rahmonov/codecrafters-redis-rust · GitHub](https://github.com/rahmonov/codecrafters-redis-rust/blob/master/src/main.rs#L38)

If I am right about the reason, either the test should wait a bit or I need to do something with the code (I don’t know yet what). I am guessing it is probably the latter haha.

Are we supposed to buffer the incoming commands even before the replica is ready to serve them?

Thank you and I look forward to hearing from you. I have been stuck for a couple of days now.

---

<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:** [February 23, 2025, 1:40pm UTC](https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130/4 "2025-02-23T13:40:57Z")

</div>

I’ll take a look and get back to you by the middle of next week.

---

<div class="post-metadata">

**Author:** ![moose-715](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/moose-715/32/32_2.png) [@moose-715](https://forum.codecrafters.io/u/moose-715)\
**Post date:** [February 23, 2025, 1:48pm UTC](https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130/5 "2025-02-23T13:48:16Z")

</div>

Thanks! Looking forward to it.

In the meantime, I might have found out what is causing this. The issue could be that in the handshake I am also getting the REPLCONF command together with the RDB file (I didn’t expect this but I guess TCP is unpredictable). And I am reading it all in the handshake. If this is correct, I should stop at RDB file and don’t read the REPLCONF until I start handling the master connection. If that makes sense.

---

<div class="post-metadata">

**Author:** ![moose-715](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/moose-715/32/32_2.png) [@moose-715](https://forum.codecrafters.io/u/moose-715)\
**Post date:** [February 24, 2025, 12:25am UTC](https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130/6 "2025-02-24T00:25:36Z")

</div>

Figured this out. Although I don’t like this, the trick was to process all bytes inside the handshake before starting another thread to handle the master connection. Otherwise it is too late and the master already starts sending requests and getting no response. Here is the commit: [Proper handshake. Passes all tests consistently · rahmonov/codecrafters-redis-rust@61b4218 · GitHub](https://github.com/rahmonov/codecrafters-redis-rust/commit/61b4218c2779dd463d6d978c878fc8cf6396cbae)

---

<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:** [February 26, 2025, 10:30am UTC](https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130/8 "2025-02-26T10:30:15Z")

</div>

@moose-715 Sorry for the delayed response. Glad you’ve found a solution!

Let me know if you encounter other issues!

---

<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:** [March 3, 2025, 10:30am UTC](https://forum.codecrafters.io/t/getting-received-no-content-received-in-xv6/5130/9 "2025-03-03T10:30:22Z")

</div>

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