test/jdk/java/net/httpclient/http2/RedirectTest.java
changeset 58758 2b13d126a2d8
parent 52121 934969c63223
equal deleted inserted replaced
58756:b7aa58d7f5aa 58758:2b13d126a2d8
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    85                         addr.toString());
    85                         addr.toString());
    86                 error = true;
    86                 error = true;
    87             }
    87             }
    88         }
    88         }
    89 
    89 
       
    90         @Override
       
    91         protected int redirectCode() {
       
    92             return 308; // we need to use a code that preserves the body
       
    93         }
       
    94 
    90         public synchronized boolean error() {
    95         public synchronized boolean error() {
    91             return error;
    96             return error;
    92         }
    97         }
    93     }
    98     }
    94 
    99