Skip to content

Commit 5629d88

Browse files
display the error pages correctly in FireFox
1 parent 22d2e21 commit 5629d88

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.3.1
2+
=================
3+
- display the error pages correctly in FireFox
4+
15
1.3.0
26
=================
37
- refactor generators

easy_html_creator.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'easy_html_creator'
3-
s.version = '1.3.0'
3+
s.version = '1.3.1'
44
s.licenses = ['MIT']
55
s.summary = "A simple project for fast and easy HTML website createmend"
66
s.description = "Easy_html_creator is a gem that makes developing static HTML websites easy and joyful.
@@ -15,8 +15,8 @@ Sass (with bootstarp)
1515
CoffeeScript
1616
1717
We also included the 'actionview' gem, to enable the use of rails standard functions like 'text_field_tag'."
18-
s.authors = ["Tom Hanoldt", "Dennis van de Hoef"]
19-
s.email = ['monotom@gmail.com', 'dennisvdhoef@gmail.com']
18+
s.authors = ["Dennis van de Hoef"]
19+
s.email = ['dennisvdhoef@gmail.com']
2020
s.files = Dir.glob("{bin,lib,dev_root}/**/*") + %w(LICENSE README.md CHANGELOG.md)
2121
s.homepage = 'http://easyhtmlcreator.bplaced.net'
2222

lib/server/server.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def listen(port, host)
2626
rescue Exception => e
2727
msg = "#{e.backtrace.first}: #{e.message} (#{e.class})", e.backtrace.drop(1).map{|s| "\t#{s}"}
2828
Server.log msg
29-
socket.print '<pre style="max-width: 100%; color: red; width: 100%; font-size:20px; white-space: normal;">'
29+
socket.print "HTTP/1.1 200 OK\r\nContent-Type: text/html;charset=utf-8\r\n\r\n"
30+
socket.print '<html><body><pre style="max-width: 100%; color: red; width: 100%; font-size:20px; white-space: normal;">'
3031

3132
socket.print msg.join("<br>")
32-
socket.print '</pre>'
33+
socket.print '</pre></body></html>'
3334
end
3435

3536
socket.close

0 commit comments

Comments
 (0)