question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing carriage returns in main example in lesson

See original GitHub issue

Description: I ran into a slight hiccup in the Networking: Write a Web Browser lesson, which is part of the “Scientific Computing with Python” course and figured I’d share in case something ought to be done to ease the way for the next person.

The carriage returns are missing from the GET request in the main example in which the GET request is stored in the cmd variable at the 1:09-minute mark in the video, like so:

cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\n\n'.encode()

When I copied the code on that page and tried to connect with the server, the server kept telling me I’d sent a bad command and that it didn’t understand what I wanted. After a bit of experimenting, I noticed that the example in the “Test” section at the bottom of the lesson page had some carriage returns (\r)in front of the line feeds (\n), like this:

cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\r\n\r\n'.encode()

When I substituted that line for the one in the main example, I was able to successfully connect to the server without issue.

The carriage returns weren’t mentioned in the lesson’s video and were just in the Test section of the page. They may have been optional at the time when that video was made and just happened to be added to the test code.

It seems that the double CRLF (\r\n\r\n) is currently how the HTTP protocol is defined by the IETF, which explains why the server was confused by my omission of them yesterday.

Perhaps a note could be added beneath the video on the lesson page letting future campers know that the carriage returns are now required.

System:

  • Device: desktop
  • OS: Ubuntu MATE 16.04 LTS
  • Browser: Firefox
  • Version: 88.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Elliriacommented, May 4, 2021

Oh, it’s a relief that the courses will still be available and that I can definitely finish all the lessons. He really is a wonderful teacher. I’m not just sort of getting it like I would with many other teachers. What Charles Severance has done is make it so I actually know things. He tops off your tanks and makes it so you walk away from each of those lessons with really solid ground beneath your feet.

The interactive curriculum sounds interesting, too, and I’ll definitely be checking that out as well when it’s released. You can never learn too much.

I’ll be learning Git properly by and by, probably once I’m done with these lessons (and/or the projects afterwards that get you the certificate). I know that GitHub offers a free tutorial you can go through.

Meanwhile, I’ll let you know if I find anything else that needs attention and would be happy to try my hand at the Git without having fully learned it with whatever instructions you provide and as long as you don’t mind if I mess it up a bit.

0reactions
moT01commented, Aug 31, 2021

Thank you for reporting this issue.

This is a standard message notifying you that the issue has become stale, so we are going to close it.

If you think we’re wrong in closing this issue, please request for it to be reopened. Thank you and happy coding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing Records | Carriage Return Issue - Alteryx Community
I'm using SourceSystemID 0000211910 as an example. This record has a carriage return issue and some of the data are in the wrong...
Read more >
fread dropping carriage returns in C? - Stack Overflow
However, fread doesn't seem to store the carriage returns present in my Windows text file, which is throwing things off when I write...
Read more >
SQL Carriage Returns or Tabs in SQL Server strings
This article explores inserting SQL carriage return, line break and tab in a string along with SSMS behavior while copying data to excel, ......
Read more >
Carriage return issue - Unix & Linux Stack Exchange
Carriage return puts the cursor back to the beginning of the line. Your output string is: This is yesterday date:20130605<Cr>end.
Read more >
carriage returns - Google Groups
csv file, BBedit shows me two of these characters. Am I missing something? The reason I ask is the new .csv files do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found