HTTP Requests on a C Server

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 6

  • @Whoeveriam226
    @Whoeveriam226 Год назад

    16:55 when you call strcat() to concatenate content with response line and headers, you get undefined behaviour due to having strings with no null-terminators as args to strcat

  • @Brad_Script
    @Brad_Script 9 месяцев назад

    isn't sizeof("method") the same thing as sizeof(char *) ?

    • @lencone
      @lencone 8 месяцев назад +2

      I'm kinda late but, when you take the size of a string literal, like sizeof("method"), you get the number of bytes necessary to hold the string, which is the number of characters + 1 for the null character at the end, whereas when you the size of any pointer, like sizeof(char *) or sizeof(int *) or any other pointer, you'll always get 8 because that's the size allocated for pointers, at least in 64-bit architectures.

  • @IK-ow2zk
    @IK-ow2zk 3 года назад

    Thanks for the video!

  • @pajeetsingh
    @pajeetsingh Год назад +1

    strtok modifies the original buffer so gotta be careful.

  • @estuardorecargador2495
    @estuardorecargador2495 2 года назад

    3:25 share it if you know please.