1

I am having a lot of confusion in pset6 because of which i think i am not able to implement the functions. Please answer my two questions(probably dumb questions) Thanks in Advance for your assistance :

  1. In const char* lookup(const char* path) how does path exactly look like(please give example) ?
  2. In bool parse(const char* line, char* abs_path, char* query) how does line exactly look like?

`

1 Answer 1

2

They are passed to PARSE the following parameters

line=0xbfffaf20

"GET /cat.jpg HTTP/1.1\r\n"

( line is a pointer to said chain )

abs_path=0xbfffd021 "" ( pointer to an empty string )

query=0xbfffb022 "" ( same )

after parse (in this case) we would have:

abs_path=0xbfffd021

"/cat.jpg"

query=0xbfffb022 "" ( does not exist )

In the second case

lookup path=0x80500a0

"/home/jharvard/Dropbox/pset6/public/cat.jpg"

It is path in our particular example. Note that path may not be exactly the same, but will serve to give you an idea of its general form

Certainly there aren`t stupid questions

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .