Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
77295de4
Commit
77295de4
authored
Aug 25, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change 404 to 410 error when raw trace is unavailable
parent
56011f9f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
1 deletion
+70
-1
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+4
-0
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+1
-1
public/410.html
public/410.html
+65
-0
No files found.
app/controllers/application_controller.rb
View file @
77295de4
...
@@ -117,6 +117,10 @@ class ApplicationController < ActionController::Base
...
@@ -117,6 +117,10 @@ class ApplicationController < ActionController::Base
render
file:
Rails
.
root
.
join
(
"public"
,
"404"
),
layout:
false
,
status:
"404"
render
file:
Rails
.
root
.
join
(
"public"
,
"404"
),
layout:
false
,
status:
"404"
end
end
def
render_410
render
file:
Rails
.
root
.
join
(
"public"
,
"410"
),
layout:
false
,
status:
"410"
end
def
no_cache_headers
def
no_cache_headers
response
.
headers
[
"Cache-Control"
]
=
"no-cache, no-store, max-age=0, must-revalidate"
response
.
headers
[
"Cache-Control"
]
=
"no-cache, no-store, max-age=0, must-revalidate"
response
.
headers
[
"Pragma"
]
=
"no-cache"
response
.
headers
[
"Pragma"
]
=
"no-cache"
...
...
app/controllers/projects/builds_controller.rb
View file @
77295de4
...
@@ -81,7 +81,7 @@ class Projects::BuildsController < Projects::ApplicationController
...
@@ -81,7 +81,7 @@ class Projects::BuildsController < Projects::ApplicationController
if
@build
.
has_trace_file?
if
@build
.
has_trace_file?
send_file
@build
.
path_to_trace
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
send_file
@build
.
path_to_trace
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
else
else
render_4
04
render_4
10
end
end
end
end
...
...
public/410.html
0 → 100644
View file @
77295de4
<!DOCTYPE html>
<html>
<head>
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1"
name=
"viewport"
>
<title>
The page you're looking for is gone (410)
</title>
<style>
body
{
color
:
#666
;
text-align
:
center
;
font-family
:
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
margin
:
auto
;
font-size
:
14px
;
}
h1
{
font-size
:
56px
;
line-height
:
100px
;
font-weight
:
normal
;
color
:
#456
;
}
h2
{
font-size
:
24px
;
color
:
#666
;
line-height
:
1.5em
;
}
h3
{
color
:
#456
;
font-size
:
20px
;
font-weight
:
normal
;
line-height
:
28px
;
}
hr
{
max-width
:
800px
;
margin
:
18px
auto
;
border
:
0
;
border-top
:
1px
solid
#EEE
;
border-bottom
:
1px
solid
white
;
}
img
{
max-width
:
40vw
;
}
.container
{
margin
:
auto
20px
;
}
</style>
</head>
<body>
<h1>
<img
src=
"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEwIiBoZWlnaHQ9IjIxMCIgdmlld0JveD0iMCAwIDIxMCAyMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTEwNS4wNjE0IDIwMy42NTVsMzguNjQtMTE4LjkyMWgtNzcuMjhsMzguNjQgMTE4LjkyMXoiIGZpbGw9IiNlMjQzMjkiLz4KICA8cGF0aCBkPSJNMTA1LjA2MTQgMjAzLjY1NDhsLTM4LjY0LTExOC45MjFoLTU0LjE1M2w5Mi43OTMgMTE4LjkyMXoiIGZpbGw9IiNmYzZkMjYiLz4KICA8cGF0aCBkPSJNMTIuMjY4NSA4NC43MzQxbC0xMS43NDIgMzYuMTM5Yy0xLjA3MSAzLjI5Ni4xMDIgNi45MDcgMi45MDYgOC45NDRsMTAxLjYyOSA3My44MzgtOTIuNzkzLTExOC45MjF6IiBmaWxsPSIjZmNhMzI2Ii8+CiAgPHBhdGggZD0iTTEyLjI2ODUgODQuNzM0Mmg1NC4xNTNsLTIzLjI3My03MS42MjVjLTEuMTk3LTMuNjg2LTYuNDExLTMuNjg1LTcuNjA4IDBsLTIzLjI3MiA3MS42MjV6IiBmaWxsPSIjZTI0MzI5Ii8+CiAgPHBhdGggZD0iTTEwNS4wNjE0IDIwMy42NTQ4bDM4LjY0LTExOC45MjFoNTQuMTUzbC05Mi43OTMgMTE4LjkyMXoiIGZpbGw9IiNmYzZkMjYiLz4KICA8cGF0aCBkPSJNMTk3Ljg1NDQgODQuNzM0MWwxMS43NDIgMzYuMTM5YzEuMDcxIDMuMjk2LS4xMDIgNi45MDctMi45MDYgOC45NDRsLTEwMS42MjkgNzMuODM4IDkyLjc5My0xMTguOTIxeiIgZmlsbD0iI2ZjYTMyNiIvPgogIDxwYXRoIGQ9Ik0xOTcuODU0NCA4NC43MzQyaC01NC4xNTNsMjMuMjczLTcxLjYyNWMxLjE5Ny0zLjY4NiA2LjQxMS0zLjY4NSA3LjYwOCAwbDIzLjI3MiA3MS42MjV6IiBmaWxsPSIjZTI0MzI5Ii8+Cjwvc3ZnPgo="
alt=
"GitLab Logo"
/><br
/>
410
</h1>
<div
class=
"container"
>
<h3>
The page you're looking for is gone.
</h3>
<hr
/>
<p>
Make sure the address is correct and that the page hasn't moved.
</p>
<p>
Please contact your GitLab administrator if you think this is a mistake.
</p>
</div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment