Skip to content

Commit

Permalink
use default fall-back name
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-nagel committed Apr 18, 2017
1 parent 6f1f3aa commit 8f17589
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ def process_record(self, record):
['Headers'] \
['Server'].strip(), 1
except KeyError:
yield '(no server in HTTP header)', 1
yield ServerCountJob.fallback_server_name, 1
elif record.rec_type == 'response':
# WARC response record
server_name = record.http_headers.get_header(
'server',
ServerCountJob.fallback_server_name)
yield server_name, 1


if __name__ == "__main__":
job = ServerCountJob()
job.run()

0 comments on commit 8f17589

Please sign in to comment.