Skip to content

Conversation

@cecio
Copy link

@cecio cecio commented Dec 9, 2017

when processing GET/POST the process looks also for a .RAW file

  • if it does not exists, it works as usual
  • if exists, it sends it back
  • For example, with the following, named "success.txt.RAW"
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 8
Last-Modified: Mon, 15 May 2017 18:04:40 GMT
ETag: "ae780585f49b94ce1444eb7d28906123"
Accept-Ranges: bytes
Server: AmazonS3
X-Amz-Cf-Id: DOMFBGDxBc9xK7seJjwbgRcfGUMjatIzbXRAY4nKJan2KJgKx6nM9g==
Cache-Control: no-cache, no-store, must-revalidate
Date: <RAW-DATE>
Connection: close

success

I can emulate the Firefox connection portal.
As you can see I also implemented some "variables" replaced at runtime. In this case ("<RAW-DATE>") is the current time. May be I can add more.

cecio added 2 commits December 9, 2017 11:40
the GET and POST requests, check now for the presence of a file with
extension .RAW. If found, it will be sent without additional headers,
assuming they are in the file itself.
The RAW file can be compiled with simple variables, replaced at runtime:
<RAW-DATE>       current time and date
generate_204.RAW - Used for Android internet check
success.txt - Used by Firefox
@strictlymike
Copy link
Collaborator

strictlymike commented Feb 5, 2018

Hi @cecio, I just wanted to acknowledge your PR. Thanks for contributing! Based on your comments above, it looks like the goal of your PR is to allow the FakeNet-NG operator to supersede specific HTTPListener responses by providing a file that HTTPListener should return when the corresponding resource is requested. Did I understand that correctly?

@cecio
Copy link
Author

cecio commented Feb 5, 2018

Yes, it is exactly this.
Thanks!

@strictlymike
Copy link
Collaborator

Alright, going to prioritize and address evaluating/integrating this in turn with other items. Thanks again!

@cecio
Copy link
Author

cecio commented Feb 5, 2018

Ok, let me know if you need some rework or modification you think could be useful.
Thanks!

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