Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Byte wise comparison #60

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

WookiesRpeople2
Copy link

Added:

pointer array for request types, this will make it more maintainable, if you want to add a request type then you can add it to the array in data.asm

Changed:

the get_check and head_check method, this is now a loop that runs until one of the strings are matched in the above mentioned array


this is a pull request for the issue #37 , Byte-wise comparison of HEAD, GET, etc.

…GET, enhanced the http.asm file to loop through the array and set the request type when found
@nemasu
Copy link
Owner

nemasu commented Oct 21, 2024

Hi, thanks for the PR.

On my end the server is segfaulting on head requests now with this change, were you able to test it?

@WookiesRpeople2
Copy link
Author

Hi sorry i took so long to replay, i just added a commit to the PR that should fix the problem with the HEAD request, thank you

@nemasu
Copy link
Owner

nemasu commented Oct 23, 2024

It seems to be working, but I'm missing something, how does this work?
jmp [req_type_ptrs + rbx * 8] ; automatically jmp to the correct method

If req_type_ptrs was like: req_type_ptrs dq set_req_get, set_req_head;, I would get it, but it's just strings?

Edit: Looking at this more, I don't think it's working. Even on HEAD requests, the entire file is still sent.

@WookiesRpeople2
Copy link
Author

WookiesRpeople2 commented Nov 8, 2024

@nemasu Hi so sorry it took so long to get back to you. you were right this wasnt working, i did'nt mange to get the cmpsb command working so i took a different route let me know what you think and any improvements you would suggest sorry and thank you again

@nemasu
Copy link
Owner

nemasu commented Nov 22, 2024

I think this is working, I'll try to do some more testing this weekend and then merge it if it goes well. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants