File tree Expand file tree Collapse file tree 8 files changed +8
-8
lines changed Expand file tree Collapse file tree 8 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 3232
3333 This custom redirection logic allows us to simply specify the image file names without worrying about their exact path e.g.'xx.jpg' and 'yy.png'.
3434
35- dotnet6
35+ dotnet8
Original file line number Diff line number Diff line change 99
1010app . MapGet ( "/" , ( context ) =>
1111{
12- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
12+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
1313 return context . Response . WriteAsync ( $@ "<html><body>
1414 Always display this page when path ends with / e.g. <a href=""/hello-world/"">/hello-world/</a> or
1515 <a href=""/welcome/everybody/inthis/train/"">/welcome/everybody/inthis/train/</a>.</body></html>" ) ;
Original file line number Diff line number Diff line change 88
99app . MapGet ( "" , ( context ) =>
1010{
11- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
11+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
1212 var path = context . Request . Query [ "Path" ] ;
1313 var ext = context . Request . Query [ "Ext" ] ;
1414 return context . Response . WriteAsync ( $@ "<html><body>Always display this page when path ends with an extension (e.g. .html or .aspx) and capture the their values.
Original file line number Diff line number Diff line change 99
1010app . MapGet ( "/" , ( context ) =>
1111{
12- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
12+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
1313 var path = context . Request . Query [ "Path" ] ;
1414 var ext = context . Request . Query [ "Ext" ] ;
1515 return context . Response . WriteAsync ( $@ "
Original file line number Diff line number Diff line change 99
1010app . MapGet ( "" , ( context ) =>
1111{
12- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
12+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
1313 var path = context . Request . Query [ "Path" ] ;
1414 var ext = context . Request . Query [ "Ext" ] ;
1515 return context . Response . WriteAsync ( $@ "<html><body>
Original file line number Diff line number Diff line change 1313
1414app . MapGet ( "" , async context =>
1515{
16- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
16+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
1717
1818 await context . Response . WriteAsync ( $ "<h1>Extension Based Redirection</h1><img src=\" ryan-wong-25025.jpg\" /> <br/> <img src=\" Acorn_PNG744.png\" />") ;
1919} ) ;
Original file line number Diff line number Diff line change 2929
3030app . MapGet ( "" , async context =>
3131{
32- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
32+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
3333
3434 await context . Response . WriteAsync ( $ "<h1>Extension Based Redirection</h1><img src=\" ryan-wong-25025.jpg\" />") ;
3535} ) ;
Original file line number Diff line number Diff line change 1414
1515 RSS reader demo using ``` Microsoft.ServiceModel.Syndication ``` .
1616
17- dotnet6
17+ dotnet8
You can’t perform that action at this time.
0 commit comments