# </head> to <link rel="stylesheet" ...></head> # <body> to <body><div class="github-fork-ribbon" ...> new_response = insert_basic_auth_marks(response) # update body size. headers['Content-Length'] = new_response.bytesize.to_s response = [new_response] end [status, headers, response] end