Skip to main content
Commonmark migration
Source Link

What would be the disadvantages of implementing a larger and feature-richer server using this class?

 

I found I had to write my own code to find the HTML and Javascript files, map their names to URLs the users could access, and read these files and send their content when the associated URL was requested. Is this normal? Isn't there a way to just say "serve all files in this directory"?

Aren't there Javascript functions and Java methods for creating and reading tree-like or graph-like data structures, which can be written/read as XML under the hood, without the programmer needing to process the message content directly?

 

Sometimes I found that the XMLHttpRequest wasn't sent successfully unless I added a 0.5s wait using setTimeout, before sending the request. I can do more testing and get more detail if necessary, but does anyone know what could be going on there?

What would be the disadvantages of implementing a larger and feature-richer server using this class?

 

I found I had to write my own code to find the HTML and Javascript files, map their names to URLs the users could access, and read these files and send their content when the associated URL was requested. Is this normal? Isn't there a way to just say "serve all files in this directory"?

Aren't there Javascript functions and Java methods for creating and reading tree-like or graph-like data structures, which can be written/read as XML under the hood, without the programmer needing to process the message content directly?

 

Sometimes I found that the XMLHttpRequest wasn't sent successfully unless I added a 0.5s wait using setTimeout, before sending the request. I can do more testing and get more detail if necessary, but does anyone know what could be going on there?

What would be the disadvantages of implementing a larger and feature-richer server using this class?

I found I had to write my own code to find the HTML and Javascript files, map their names to URLs the users could access, and read these files and send their content when the associated URL was requested. Is this normal? Isn't there a way to just say "serve all files in this directory"?

Aren't there Javascript functions and Java methods for creating and reading tree-like or graph-like data structures, which can be written/read as XML under the hood, without the programmer needing to process the message content directly?

Sometimes I found that the XMLHttpRequest wasn't sent successfully unless I added a 0.5s wait using setTimeout, before sending the request. I can do more testing and get more detail if necessary, but does anyone know what could be going on there?

Tweeted twitter.com/StackCodeReview/status/1250393505161269252
Discovered why it didn't work on other browsers and fixed the code, so no need to include that question any more
Source Link
OpenSauce
  • 218
  • 1
  • 5
  1. If I go bigger on my next project, what security issues do I need to consider? As far as I can see, there's no possibility of code injection via the HTML forms, because the input is encoded by default, but have I missed something?
  2. Can anyone tell me why it currently only works on Firefox? Chrome displays the code instead of running it, and Edge just shows a blank page. Haven't tested on other browsers.

If I go bigger on my next project, what security issues do I need to consider? As far as I can see, there's no possibility of code injection via the HTML forms, because the input is encoded by default, but have I missed something?

The complete code is on github. To answer the misc questionsquestion, you probably just need to check the headers and forms in celebrity.html.

  1. If I go bigger on my next project, what security issues do I need to consider? As far as I can see, there's no possibility of code injection via the HTML forms, because the input is encoded by default, but have I missed something?
  2. Can anyone tell me why it currently only works on Firefox? Chrome displays the code instead of running it, and Edge just shows a blank page. Haven't tested on other browsers.

The complete code is on github. To answer the misc questions, you probably just need to check the headers and forms in celebrity.html.

If I go bigger on my next project, what security issues do I need to consider? As far as I can see, there's no possibility of code injection via the HTML forms, because the input is encoded by default, but have I missed something?

The complete code is on github. To answer the misc question, you probably just need to check the headers and forms in celebrity.html.

Added tag ajax
Link
OpenSauce
  • 218
  • 1
  • 5
Source Link
OpenSauce
  • 218
  • 1
  • 5
Loading